refactor: use replaceAll()
instead of replace()
when appropriate (#39721)
refactor: use replaceAll() instead of replace() when appropriate
This commit is contained in:
parent
029127a8b6
commit
f6e8544ef6
10 changed files with 20 additions and 20 deletions
|
@ -111,7 +111,7 @@ describe('debugger module', () => {
|
|||
it('fires message event', async () => {
|
||||
const url = process.platform !== 'win32'
|
||||
? `file://${path.join(fixtures, 'pages', 'a.html')}`
|
||||
: `file:///${path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/')}`;
|
||||
: `file:///${path.join(fixtures, 'pages', 'a.html').replaceAll('\\', '/')}`;
|
||||
w.webContents.loadURL(url);
|
||||
w.webContents.debugger.attach();
|
||||
const message = emittedUntil(w.webContents.debugger, 'message',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue