xref: /third_party/node/test/parallel/test-async-hooks-enable-during-promise.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
1'use strict';
2const common = require('../common');
3const async_hooks = require('async_hooks');
4
5Promise.resolve(1).then(common.mustCall(() => {
6  async_hooks.createHook({
7    init: common.mustCall(),
8    before: common.mustCallAtLeast(),
9    after: common.mustCallAtLeast(2)
10  }).enable();
11
12  process.nextTick(common.mustCall());
13}));
14

Indexes created Thu Nov 07 10:32:03 CST 2024