mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
610669460d
Change TypeError to a regular expression in assert.throws() in test/parallel/test-signal-safety.js. PR-URL: https://github.com/nodejs/node/pull/14285 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
13 lines
344 B
JavaScript
13 lines
344 B
JavaScript
'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$/);
|