Skip to content

Commit bbdd93f

Browse files
trevnorrisMylesBorins
authored andcommitted
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: #14208 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 98fc665 commit bbdd93f

File tree

1 file changed

+5
-0
lines changed
  • test/addons/async-hooks-promise

1 file changed

+5
-0
lines changed

test/addons/async-hooks-promise/test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ const assert = require('assert');
55
const async_hooks = require('async_hooks');
66
const binding = require(`./build/${common.buildType}/binding`);
77

8+
if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
9+
common.skip('cannot test with env var NODE_TEST_WITH_ASYNC_HOOKS');
10+
return;
11+
}
12+
813
// Baseline to make sure the internal field isn't being set.
914
assert.strictEqual(
1015
binding.getPromiseField(Promise.resolve(1)),

0 commit comments

Comments
 (0)