feat: promisify netLog.stopLogging (#16862)

This commit is contained in:
Milan Burda 2019-02-19 11:48:27 +01:00 committed by Alexey Kuzmin
parent 3b74837020
commit 7e7abc28f5
9 changed files with 78 additions and 35 deletions

View file

@ -14,14 +14,6 @@ function request () {
})
}
function stopLogging (netLog) {
return new Promise((resolve) => {
netLog.stopLogging((path) => {
resolve()
})
})
}
app.on('ready', async () => {
const netLog = session.defaultSession.netLog
@ -38,7 +30,7 @@ app.on('ready', async () => {
await request()
if (process.env.TEST_MANUAL_STOP) {
await stopLogging(netLog)
await netLog.stopLogging()
}
app.quit()