2017-10-19 12:43:40 +02:00
|
|
|
'use strict';
|
2017-10-19 14:15:08 +02:00
|
|
|
// Flags: --no-force-async-hooks-checks --expose-internals
|
2018-05-18 01:20:25 +02:00
|
|
|
const common = require('../common');
|
|
|
|
|
|
|
|
if (!common.isMainThread)
|
|
|
|
common.skip('Workers don\'t inherit per-env state like the check flag');
|
2017-10-19 12:43:40 +02:00
|
|
|
|
2017-11-22 11:25:03 +01:00
|
|
|
const async_hooks = require('internal/async_hooks');
|
2017-10-19 12:43:40 +02:00
|
|
|
|
|
|
|
// Negative asyncIds and invalid type name
|
|
|
|
async_hooks.emitInit(-1, null, -1, {});
|
|
|
|
async_hooks.emitBefore(-1, -1);
|
|
|
|
async_hooks.emitAfter(-1);
|
|
|
|
async_hooks.emitDestroy(-1);
|