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:
cjihrig 2018-02-11 17:07:39 -05:00
parent f1fc426cce
commit 755e07cb73
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -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());