• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../../common');
4const assert = require('assert');
5const binding = require(`./build/${common.buildType}/binding`);
6const async_hooks = require('async_hooks');
7
8assert.strictEqual(
9  binding.getExecutionAsyncId(),
10  async_hooks.executionAsyncId(),
11);
12assert.strictEqual(
13  binding.getTriggerAsyncId(),
14  async_hooks.triggerAsyncId(),
15);
16
17process.nextTick(common.mustCall(() => {
18  assert.strictEqual(
19    binding.getExecutionAsyncId(),
20    async_hooks.executionAsyncId(),
21  );
22  assert.strictEqual(
23    binding.getTriggerAsyncId(),
24    async_hooks.triggerAsyncId(),
25  );
26}));
27