test: remove unnecessary timer
The timer in NAPI's test_callback_scope/test-resolve-async.js can be removed. If the test fails, it will timeout on its own. The extra timer increases the chances of the test being flaky. PR-URL: https://github.com/nodejs/node/pull/18719 Fixes: https://github.com/nodejs/node/issues/18702 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
f1fc426cce
commit
755e07cb73
@ -1,13 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const common = require('../../common');
|
||||
const assert = require('assert');
|
||||
const { testResolveAsync } = require(`./build/${common.buildType}/binding`);
|
||||
|
||||
let called = false;
|
||||
testResolveAsync().then(common.mustCall(() => {
|
||||
called = true;
|
||||
}));
|
||||
|
||||
setTimeout(common.mustCall(() => { assert(called); }),
|
||||
common.platformTimeout(20));
|
||||
testResolveAsync().then(common.mustCall());
|
||||
|
Loading…
x
Reference in New Issue
Block a user