Skip to content

Commit

Permalink
test: skip test when checking async_hooks
Browse files Browse the repository at this point in the history
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: nodejs#14208
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
trevnorris committed Sep 27, 2017
1 parent 44dc449 commit d28d20c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/addons/async-hooks-promise/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ const assert = require('assert');
const async_hooks = require('async_hooks');
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.
assert.strictEqual(
binding.getPromiseField(Promise.resolve(1)),
Expand Down

0 comments on commit d28d20c

Please sign in to comment.