Skip to content

Commit

Permalink
test: fix flaky addons/callback-scope/test-resolve-async
Browse files Browse the repository at this point in the history
Fixes: #22668
  • Loading branch information
addaleax committed Sep 3, 2018
1 parent b797103 commit b85baf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/addons/callback-scope/test-resolve-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const common = require('../../common');
const assert = require('assert');
const { testResolveAsync } = require(`./build/${common.buildType}/binding`);

// Checks that resolving promises from C++ works.

let called = false;
testResolveAsync().then(() => { called = true; });

setTimeout(() => { assert(called); }, common.platformTimeout(50));
process.on('beforeExit', () => { assert(called); });

0 comments on commit b85baf7

Please sign in to comment.