1'use strict'; 2 3const common = require('../common'); 4const async_hooks = require('async_hooks'); 5const fs = require('fs'); 6 7const nestedHook = async_hooks.createHook({ 8 init: common.mustCall() 9}); 10 11async_hooks.createHook({ 12 init: common.mustCall(() => { 13 nestedHook.enable(); 14 }, 2) 15}).enable(); 16 17fs.access(__filename, common.mustCall(() => { 18 fs.access(__filename, common.mustCall()); 19})); 20