• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2require('../common');
3const assert = require('assert');
4const async_hooks = require('async_hooks');
5
6// Ensure that asyncResource.makeCallback returns the callback return value.
7const a = new async_hooks.AsyncResource('foobar');
8const ret = a.runInAsyncScope(() => {
9  return 1729;
10});
11assert.strictEqual(ret, 1729);
12