test: skip test when checking async_hooks
The test addons/async-hooks-promise depends on there being only one hook available. So skip it if NODE_TEST_WITH_ASYNC_HOOKS is set. PR-URL: https://github.com/nodejs/node/pull/14208 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
44dc449eff
commit
d28d20ccb7
@ -5,6 +5,11 @@ const assert = require('assert');
|
|||||||
const async_hooks = require('async_hooks');
|
const async_hooks = require('async_hooks');
|
||||||
const binding = require(`./build/${common.buildType}/binding`);
|
const binding = require(`./build/${common.buildType}/binding`);
|
||||||
|
|
||||||
|
if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
|
||||||
|
common.skip('cannot test with env var NODE_TEST_WITH_ASYNC_HOOKS');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Baseline to make sure the internal field isn't being set.
|
// Baseline to make sure the internal field isn't being set.
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
binding.getPromiseField(Promise.resolve(1)),
|
binding.getPromiseField(Promise.resolve(1)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user