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
PR-URL: #22664
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax authored and targos committed Sep 7, 2018
1 parent 2b49b43 commit 1ce9416
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 1ce9416

Please sign in to comment.