Print detailed error for serviceWorker test (#12186)

This commit is contained in:
Cheng Zhao 2018-03-09 11:06:29 +09:00 committed by Shelley Vohr
parent 44c66fc284
commit cde0c1d418
2 changed files with 2 additions and 2 deletions

View file

@ -139,7 +139,7 @@ describe('chromium feature', () => {
if (args[0] === 'reload') {
w.webContents.reload()
} else if (args[0] === 'error') {
done(new Error(`unexpected error : ${JSON.stringify(args[1])}`))
done(args[1])
} else if (args[0] === 'response') {
assert.equal(args[1], 'Hello from serviceWorker!')
session.defaultSession.clearStorageData({

View file

@ -13,6 +13,6 @@
ipcRenderer.send('reload');
}
}).catch(function(error) {
ipcRenderer.send('error', error);
ipcRenderer.send('error', `${error.message}\n${error.stack}`);
})
</script>