summaryrefslogtreecommitdiff
path: root/test/parallel/test-signal-safety.js
blob: 917e7c2cfac2a3090f245a661c6e6d53a8e5c147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Flags: --expose-internals
'use strict';
require('../common');
const assert = require('assert');
const { internalBinding } = require('internal/test/binding');
const { Signal } = internalBinding('signal_wrap');

// Test Signal `this` safety
// https://github.com/joyent/node/issues/6690
assert.throws(function() {
  const s = new Signal();
  const nots = { start: s.start };
  nots.start(9);
}, /^TypeError: Illegal invocation$/);