fix: util.promisify(setTimeout) (#13860)
This commit is contained in:
parent
2bdb7a5047
commit
a62cb1e84c
3 changed files with 21 additions and 4 deletions
|
@ -179,6 +179,10 @@ describe('node feature', () => {
|
|||
it('can be scheduled in time', (done) => {
|
||||
remote.getGlobal('setTimeout')(done, 0)
|
||||
})
|
||||
|
||||
it('can be promisified', (done) => {
|
||||
remote.getGlobal('setTimeoutPromisified')(0).then(done)
|
||||
})
|
||||
})
|
||||
|
||||
describe('setInterval called under Chromium event loop in browser process', () => {
|
||||
|
|
|
@ -79,6 +79,8 @@ ipcMain.on('echo', function (event, msg) {
|
|||
event.returnValue = msg
|
||||
})
|
||||
|
||||
global.setTimeoutPromisified = util.promisify(setTimeout)
|
||||
|
||||
const coverage = new Coverage({
|
||||
outputPath: path.join(__dirname, '..', '..', 'out', 'coverage')
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue