• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../../common');
4const assert = require('assert');
5const { runInCallbackScope } = require(`./build/${common.buildType}/binding`);
6
7assert.strictEqual(runInCallbackScope({}, 0, 0, () => 42), 42);
8
9{
10  process.once('uncaughtException', common.mustCall((err) => {
11    assert.strictEqual(err.message, 'foo');
12  }));
13
14  runInCallbackScope({}, 0, 0, () => {
15    throw new Error('foo');
16  });
17}
18