refactor: use loadFile when appropriate in tests (#14422)
This commit is contained in:
parent
e8782f2c2d
commit
c63014c256
13 changed files with 115 additions and 137 deletions
|
@ -33,7 +33,7 @@ describe('debugger module', () => {
|
|||
done()
|
||||
}
|
||||
})
|
||||
w.webContents.loadURL(`file://${path.join(fixtures, 'pages', 'a.html')}`)
|
||||
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
|
||||
})
|
||||
|
||||
it('fails when protocol version is not supported', done => {
|
||||
|
@ -108,7 +108,7 @@ describe('debugger module', () => {
|
|||
const url = process.platform !== 'win32'
|
||||
? `file://${path.join(fixtures, 'pages', 'a.html')}`
|
||||
: `file:///${path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/')}`
|
||||
w.webContents.loadURL(url)
|
||||
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
|
||||
|
||||
try {
|
||||
w.webContents.debugger.attach()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue