11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst async_hooks = require('async_hooks'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci// Ensure that asyncResource.makeCallback returns the callback return value. 71cb0ef41Sopenharmony_ciconst a = new async_hooks.AsyncResource('foobar'); 81cb0ef41Sopenharmony_ciconst ret = a.runInAsyncScope(() => { 91cb0ef41Sopenharmony_ci return 1729; 101cb0ef41Sopenharmony_ci}); 111cb0ef41Sopenharmony_ciassert.strictEqual(ret, 1729); 12