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: nodejs#22668
PR-URL: nodejs#22664
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: George Adams <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
addaleax authored and danbev committed Sep 7, 2018
1 parent 3295710 commit 4a5886c
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 4a5886c

Please sign in to comment.