xref: /third_party/node/test/parallel/test-async-hooks-enable-during-promise.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst async_hooks = require('async_hooks');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciPromise.resolve(1).then(common.mustCall(() => {
61cb0ef41Sopenharmony_ci  async_hooks.createHook({
71cb0ef41Sopenharmony_ci    init: common.mustCall(),
81cb0ef41Sopenharmony_ci    before: common.mustCallAtLeast(),
91cb0ef41Sopenharmony_ci    after: common.mustCallAtLeast(2)
101cb0ef41Sopenharmony_ci  }).enable();
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ci  process.nextTick(common.mustCall());
131cb0ef41Sopenharmony_ci}));
14

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