summaryrefslogtreecommitdiff
path: root/test/parallel/test-signal-safety.js
blob: a4fb618b1cbfa57942e5020bf009e45c9e3408f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'use strict';
require('../common');
const assert = require('assert');
const Signal = process.binding('signal_wrap').Signal;

// 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$/);