Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3d41643
deps: update undici to 7.19.0
nodejs-github-bot Jan 24, 2026
05e9a9f
deps: update undici to 7.19.1
nodejs-github-bot Jan 25, 2026
625b90b
deps: update undici to 7.19.2
nodejs-github-bot Jan 30, 2026
a9e70ce
test: ensure assertions are reached on more tests
aduh95 Nov 15, 2025
a723f72
lib: add support for readable byte streams to .toWeb()
seriousme Nov 16, 2025
5a9e9f4
meta: bump actions/checkout from 5.0.0 to 5.0.1
dependabot[bot] Nov 20, 2025
9370330
repl: tab completion targets `<class>` instead of `new <class>`
hainenber Nov 20, 2025
f814307
lib: prefer `call()` over `apply()` if argument list is not array
LiviaMedeiros Nov 23, 2025
1948861
events: repurpose `events.listenerCount()` to accept EventTargets
Renegade334 Nov 26, 2025
8c75e4e
meta: bump actions/checkout from 5.0.1 to 6.0.0
dependabot[bot] Dec 3, 2025
35b1759
module: allow subpath imports that start with `#/`
hybrist Dec 4, 2025
407807b
test: skip tests not passing without `NODE_OPTIONS` support
aduh95 Dec 7, 2025
cb54b3c
http: add http.setGlobalProxyFromEnv()
joyeecheung Dec 10, 2025
8e900af
util: add convertProcessSignalToExitCode utility
ErickWendel Dec 11, 2025
9cc1c46
repl: fix getters triggering side effects during completion
dario-piotrowicz Dec 20, 2025
2d72ea6
process: preserve AsyncLocalStorage in queueMicrotask only when needed
gurgunday Dec 21, 2025
f5233df
stream: do not pass `readable.compose()` output via `Readable.from()`
Renegade334 Dec 23, 2025
cd80d36
meta: bump actions/upload-artifact from 5.0.0 to 6.0.0
dependabot[bot] Jan 3, 2026
629f0ea
meta: bump actions/checkout from 6.0.0 to 6.0.1
dependabot[bot] Jan 3, 2026
ce2acf0
meta: bump actions/download-artifact from 6.0.0 to 7.0.0
dependabot[bot] Jan 3, 2026
e54975e
deps: V8: cherry-pick highway@dcc0ca1cd42
richardlau Jan 16, 2026
74bcd0a
test: ensure assertions are reached on more tests
aduh95 Nov 17, 2025
aeed0cc
test: use `RegExp.escape` to improve test reliability
aduh95 Nov 23, 2025
e06adcb
test: ensure assertions are reached on more tests
aduh95 Nov 24, 2025
2738328
test: ensure assertions are reached on more tests
aduh95 Nov 17, 2025
8e9aded
test: ensure assertions are reached on all tests
aduh95 Nov 27, 2025
4afbbcf
tools: enforce trailing commas in `test/sequential`
aduh95 Dec 3, 2025
8a0f619
tools: enforce trailing commas in `test/es-module`
aduh95 Nov 29, 2025
4f871ee
test: enforce better never-settling-promise detection
aduh95 Dec 10, 2025
d4034df
test: forbid use of named imports for fixtures
aduh95 Jan 1, 2026
8e48e72
doc: clean up writing-and-running-benchmarks.md
Hardanish-Singh Jan 13, 2026
d77f98c
test_runner: support expecting a test-case to fail
JakobJingleheimer Jan 15, 2026
24cf6b8
test: reveal wpt evaluation errors in status files
legendecas Jan 19, 2026
33d8e83
sqlite: add sqlite prepare options args
araujogui Jan 19, 2026
c0ceb9b
sqlite: enable defensive mode by default
louwers Jan 20, 2026
345a40f
test: use fixture directories for sea tests
joyeecheung Jan 1, 2026
c370c3d
deps: add tools and scripts to pull LIEF as a dependency
joyeecheung Dec 22, 2025
f3a24c7
deps: add LIEF as a dependency
joyeecheung Dec 22, 2025
6f4a4f6
sea: split sea binary manipulation code
joyeecheung Dec 22, 2025
d6f7c8d
fs: add ignore option to fs.watch
mcollina Jan 22, 2026
43b8a2b
test: add some validation for JSON doc output
aduh95 Jan 23, 2026
da13186
src: throw RangeError on failed ArrayBuffer BackingStore allocation
legendecas Jan 25, 2026
16bab79
process: do not truncate long strings in `--print`
mohd-akram Jan 25, 2026
8d7190b
module: do not wrap module._load when tracing is not enabled
joyeecheung Jan 26, 2026
ab63ddf
tools: add LIEF to license builder
legendecas Jan 26, 2026
7824c75
lib: unify ICU and no-ICU TextDecoder
ChALkeR Jan 27, 2026
8b6d31d
async_hooks: add trackPromises option to createHook()
joyeecheung Jan 28, 2026
8e8f705
sqlite: reserve vectors space
araujogui Jan 29, 2026
972f824
test_runner: add env option to run function
Ethan-Arrowood Jan 29, 2026
4c80031
stream: add bytes() method to stream/consumers
wantaekchoi Jan 29, 2026
069874b
lib: use StringPrototypeStartsWith from primordials in locks
kimtaejin3 Jan 29, 2026
6640de2
test_runner: differentiate todo and failure styles
MoLow Jan 30, 2026
5998987
build: aix: deoptimize implementation-visitor.cc with --shared
sxa Jan 30, 2026
6a4de69
test_runner: fix passing `expectFailure`
MoLow Jan 30, 2026
830fff0
lib: recycle queues
ronag Jan 30, 2026
8c25489
test: split test-fs-watch-ignore-*
lpinca Jan 30, 2026
0e7571a
sqlite: change approach to fix segfault SQLTagStore
louwers Jan 31, 2026
180778f
assert: fix loose deepEqual arrays with undefined and null failing
BridgeAR Feb 1, 2026
6df8be4
lib: use utf8 fast path for streaming TextDecoder
ChALkeR Jan 27, 2026
83bcd38
benchmark: add streaming TextDecoder benchmark
ChALkeR Jan 27, 2026
563ab69
src: add initial support for ESM in embedder API
joyeecheung Jan 26, 2026
21b23cd
test_runner: fix test enqueue when test file has syntax error
geeksilva97 Feb 2, 2026
1519251
module: do not invoke resolve hooks twice for imported cjs
joyeecheung Feb 2, 2026
4b2187a
test: unify assertSnapshot common patterns
legendecas Feb 2, 2026
b5113e2
deps: update amaro to 1.1.6
nodejs-github-bot Feb 3, 2026
74e4710
deps: update googletest to 56efe3983185e3f37e43415d1afa97e3860f187f
nodejs-github-bot Feb 3, 2026
4889dc4
doc: update `server.dropMaxConnection` link
samuel871211 Feb 3, 2026
356ff5f
test: use the skipIfNoWatch() utility function
lpinca Feb 3, 2026
ecf5947
test: update WPT for url to e3c46fdf55
nodejs-github-bot Feb 3, 2026
eac9f4f
test: fix race condition in watch mode tests
mcollina Feb 3, 2026
9d79c66
test: remove duplicate wpt tests
panva Feb 3, 2026
c085c8a
meta: bump actions/checkout from 6.0.1 to 6.0.2
dependabot[bot] Feb 3, 2026
5da7b51
meta: bump actions/stale from 10.1.0 to 10.1.1
dependabot[bot] Feb 3, 2026
0e5922e
meta: bump peter-evans/create-pull-request from 8.0.0 to 8.1.0
dependabot[bot] Feb 3, 2026
9a64f2f
meta: bump actions/cache from 5.0.1 to 5.0.3
dependabot[bot] Feb 3, 2026
c517df2
meta: bump actions/setup-node from 6.1.0 to 6.2.0
dependabot[bot] Feb 3, 2026
e8d9bd9
meta: bump actions/setup-python from 6.1.0 to 6.2.0
dependabot[bot] Feb 3, 2026
0637bdb
meta: bump step-security/harden-runner from 2.14.0 to 2.14.1
dependabot[bot] Feb 4, 2026
40a872a
meta: bump github/codeql-action from 4.31.9 to 4.32.0
dependabot[bot] Feb 4, 2026
2d7e5f9
http: implement slab allocation for HTTP header parsing
mertcanaltin Feb 4, 2026
d52b535
doc: correct tools README Boxstarter link
MikeMcC399 Feb 4, 2026
b78d814
meta: persist sccache daemon until end of build workflows
Renegade334 Feb 4, 2026
17b363a
dns: fix Windows SRV ECONNREFUSED by adjusting c-ares fallback detection
NotVivek12 Feb 3, 2026
06513f5
test: fix flaky test-performance-eventloopdelay
mcollina Feb 5, 2026
8f5a3e5
doc: fix grammatical error in README.md
junnyontop-pixel Feb 5, 2026
f91a377
sqlite: use DictionaryTemplate for run() result
mertcanaltin Feb 5, 2026
4c1abf7
tools,win: upgrade install additional tools to Visual Studio 2026
MikeMcC399 Feb 5, 2026
5e71924
doc: deprecation add more codemod
AugustinMauroy Feb 5, 2026
a0e09c9
doc: document `url.format(urlString)` as deprecated under DEP0169
Renegade334 Feb 5, 2026
f0f98d4
tools: use ubuntu-slim runner in meta GitHub Actions
bnb Feb 6, 2026
6059055
tools: enforce removal of `lts-watch-*` labels on release proposals
aduh95 Feb 6, 2026
7a83b38
net: defer synchronous destroy calls in internalConnect
RajeshKumar11 Feb 6, 2026
38f43a6
test: fix case-insensitive path matching on Windows
mcollina Feb 6, 2026
97e5a65
deps: update undici to 7.21.0
nodejs-github-bot Feb 6, 2026
f44e67f
doc: fix --inspect security warning section
pimterry Feb 6, 2026
46a2dad
sqlite: avoid extra copy for large text binds
thisalihassan Feb 7, 2026
db478c4
src: use simdutf for one-byte string UTF-8 write in stringBytes
mertcanaltin Feb 6, 2026
5b8e72c
doc: mention default option for test runner env
styfle Feb 7, 2026
2d3b4a8
test: print stack immediately avoiding GC interleaving
legendecas Feb 7, 2026
33d0a8c
doc: clarify EventEmitter error handling in threat model
mcollina Feb 7, 2026
f0d8f37
src: elide heap allocation in structured clone implementation
addaleax Feb 8, 2026
7be7631
deps: update minimatch to 10.1.2
nodejs-github-bot Feb 8, 2026
699e2f8
deps: update amaro to 1.1.7
nodejs-github-bot Feb 8, 2026
2d6735d
deps: upgrade npm to 11.9.0
npm-cli-bot Feb 9, 2026
ad04a46
test: restraint version replacement pattern in snapshots
legendecas Feb 9, 2026
584c189
build: add `--shared-gtest` configure flag
aduh95 Jan 7, 2026
c6253ed
build: add `--shared-hdr-histogram` configure flag
aduh95 Jan 4, 2026
30601b6
build: add `--shared-nbytes` configure flag
aduh95 Jan 13, 2026
68da144
build,deps: replace cjs-module-lexer with merve
anonrig Jan 28, 2026
1f84fd9
build: skip sscache action on non-main branches
joyeecheung Feb 19, 2026
65c77d7
tools: use ubuntu-latest runner in `notify-on-push` workflow
aduh95 Feb 8, 2026
f658f48
tools: use ubuntu-slim runner in GHA
aduh95 Feb 10, 2026
e50e2f0
tools: use ubuntu-slim runner in GHA
aduh95 Feb 12, 2026
034589d
tools: avoid building twice in coverage jobs
aduh95 Feb 22, 2026
f98986c
tools: switch to ARM runners on GHA jobs
aduh95 Feb 22, 2026
4c10584
build: add support for Visual Studio 2026
targos Nov 19, 2025
6a4511b
build,win: fix vs2022 compilation
StefanStojanovic Jan 28, 2026
f657bb8
2026-02-24, Version 24.14.0 'Krypton' (LTS)
aduh95 Feb 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: use RegExp.escape to improve test reliability
PR-URL: #60803
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
aduh95 committed Feb 22, 2026
commit aeed0ccc02b274db8bed642aabada27fcb095c25
2 changes: 1 addition & 1 deletion test/common/assertSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function replaceTestDuration(str) {

const root = path.resolve(__dirname, '..', '..');
const color = '(\\[\\d+m)';
const stackTraceBasePath = new RegExp(`${color}\\(${root.replaceAll(/[\\^$*+?.()|[\]{}]/g, '\\$&')}/?${color}(.*)${color}\\)`, 'g');
const stackTraceBasePath = new RegExp(`${color}\\(${RegExp.escape(root)}/?${color}(.*)${color}\\)`, 'g');

function replaceSpecDuration(str) {
return str
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-crypto-argon2.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ for (const [algorithm, overrides, expected] of good) {
for (const [algorithm, overrides, param] of bad) {
const expected = {
code: 'ERR_OUT_OF_RANGE',
message: new RegExp(`The value of "${param}" is out of range`),
message: new RegExp(`The value of "${RegExp.escape(param)}" is out of range`),
};
const parameters = { ...defaults, ...overrides };
assert.throws(() => crypto.argon2(algorithm, parameters, () => {}), expected);
Expand All @@ -122,7 +122,7 @@ for (const [algorithm, overrides, param] of bad) {
for (const key of Object.keys(defaults)) {
const expected = {
code: 'ERR_INVALID_ARG_TYPE',
message: new RegExp(`"parameters\\.${key}"`),
message: new RegExp(`"parameters\\.${RegExp.escape(key)}"`),
};
const parameters = { ...defaults };
delete parameters[key];
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-x509.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI=
'OCSP - URI': ['http://ocsp.nodejs.org/'],
'CA Issuers - URI': ['http://ca.nodejs.org/ca.cert']
}),
modulusPattern: new RegExp(`^${modulusOSSL}$`, 'i'),
modulusPattern: new RegExp(`^${RegExp.escape(modulusOSSL)}$`, 'i'),
bits: 2048,
exponent: '0x10001',
valid_from: 'Sep 3 21:40:37 2022 GMT',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-module-loading-globalpaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (process.argv[2] === 'child') {
child_process.execFileSync(testExecPath, [ __filename, 'child' ],
{ encoding: 'utf8', env: env });
},
new RegExp(`Cannot find module '${pkgName}'`));
new RegExp(`Cannot find module '${RegExp.escape(pkgName)}'`));

// Test module in $HOME/.node_modules.
const modHomeDir = path.join(testFixturesDir, 'home-pkg-in-node_modules');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-permission-warning-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ for (const flag of warnFlags) {
]
);

assert.match(stderr.toString(), new RegExp(`SecurityWarning: The flag ${flag} must be used with extreme caution`));
assert.match(stderr.toString(), new RegExp(`SecurityWarning: The flag ${RegExp.escape(flag)} must be used with extreme caution`));
assert.strictEqual(status, 0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const cliMd = path.join(rootDir, 'doc', 'api', 'cli.md');
const cliText = fs.readFileSync(cliMd, { encoding: 'utf8' });

const parseSection = (text, startMarker, endMarker) => {
const regExp = new RegExp(`${startMarker}\r?\n([^]*)\r?\n${endMarker}`);
const regExp = new RegExp(`${RegExp.escape(startMarker)}\r?\n([^]*)\r?\n${RegExp.escape(endMarker)}`);
const match = text.match(regExp);
assert(match,
`Unable to locate text between '${startMarker}' and '${endMarker}'.`);
Expand Down
18 changes: 9 additions & 9 deletions test/parallel/test-release-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const fs = require('fs');
const path = require('path');

const getDefine = (text, name) => {
const regexp = new RegExp(`#define\\s+${name}\\s+(.*)`);
const regexp = new RegExp(`#define\\s+${RegExp.escape(name)}\\s+(.*)`);
const match = regexp.exec(text);
assert.notStrictEqual(match, null);
return match[1];
Expand All @@ -27,7 +27,7 @@ if (!release) {
const major = getDefine(versionText, 'NODE_MAJOR_VERSION');
const minor = getDefine(versionText, 'NODE_MINOR_VERSION');
const patch = getDefine(versionText, 'NODE_PATCH_VERSION');
const versionForRegex = `${major}\\.${minor}\\.${patch}`;
const versionForRegex = RegExp.escape(`${major}.${minor}.${patch}`);

const lts = getDefine(versionText, 'NODE_VERSION_IS_LTS') !== '0';
const codename = getDefine(versionText, 'NODE_VERSION_LTS_CODENAME').slice(1, -1);
Expand All @@ -45,7 +45,7 @@ const changelogPath = `doc/changelogs/CHANGELOG_V${major}.md`;
// Check table header
let tableHeader;
if (lts) {
tableHeader = new RegExp(`<th>LTS '${codename}'</th>`);
tableHeader = new RegExp(`<th>LTS '${RegExp.escape(codename)}'</th>`);
} else {
tableHeader = /<th>Current<\/th>/;
}
Expand All @@ -57,7 +57,7 @@ const changelogPath = `doc/changelogs/CHANGELOG_V${major}.md`;
// Check title for changelog entry.
let title;
if (lts) {
title = new RegExp(`## \\d{4}-\\d{2}-\\d{2}, Version ${versionForRegex} '${codename}' \\(LTS\\), @\\S+`);
title = new RegExp(`## \\d{4}-\\d{2}-\\d{2}, Version ${versionForRegex} '${RegExp.escape(codename)}' \\(LTS\\), @\\S+`);
} else {
title = new RegExp(`## \\d{4}-\\d{2}-\\d{2}, Version ${versionForRegex} \\(Current\\), @\\S+`);
}
Expand All @@ -70,20 +70,20 @@ const changelogPath = `doc/changelogs/CHANGELOG_V${major}.md`;
// Check for the link to the appropriate CHANGELOG_V*.md file.
let linkToChangelog;
if (lts) {
linkToChangelog = new RegExp(`\\[Node\\.js ${major}\\]\\(${changelogPath}\\) \\*\\*Long Term Support\\*\\*`);
linkToChangelog = new RegExp(`\\[Node\\.js ${major}\\]\\(${RegExp.escape(changelogPath)}\\) \\*\\*Long Term Support\\*\\*`);
} else {
linkToChangelog = new RegExp(`\\[Node\\.js ${major}\\]\\(${changelogPath}\\) \\*\\*Current\\*\\*`);
linkToChangelog = new RegExp(`\\[Node\\.js ${major}\\]\\(${RegExp.escape(changelogPath)}\\) \\*\\*Current\\*\\*`);
}
assert.match(mainChangelog, linkToChangelog);
// Check table header.
let tableHeader;
if (lts) {
tableHeader = new RegExp(`<th title="LTS Until \\d{4}-\\d{2}"><a href="${changelogPath}">${major}</a> \\(LTS\\)</th>`);
tableHeader = new RegExp(`<th title="LTS Until \\d{4}-\\d{2}"><a href="${RegExp.escape(changelogPath)}">${major}</a> \\(LTS\\)</th>`);
} else {
tableHeader = new RegExp(`<th title="Current"><a href="${changelogPath}">${major}</a> \\(Current\\)</th>`);
tableHeader = new RegExp(`<th title="Current"><a href="${RegExp.escape(changelogPath)}">${major}</a> \\(Current\\)</th>`);
}
assert.match(mainChangelog, tableHeader);
// Check the table contains a link to the release in the appropriate CHANGELOG_V*.md file.
const linkToVersion = new RegExp(`<b><a href="${changelogPath}#${versionForRegex}">${versionForRegex}</a></b><br/>`);
const linkToVersion = new RegExp(`<b><a href="${RegExp.escape(changelogPath)}#${versionForRegex}">${versionForRegex}</a></b><br/>`);
assert.match(mainChangelog, linkToVersion);
}
4 changes: 2 additions & 2 deletions test/parallel/test-repl-custom-eval-previews.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('with previews', () => {
);
const lines = getSingleCommandLines(output);
assert.match(lines.command, /^'Hello custom' \+ ' eval World!'/);
assert.match(lines.prompt, new RegExp(`${testingReplPrompt}$`));
assert.match(lines.prompt, new RegExp(`${RegExp.escape(testingReplPrompt)}$`));
assert.strictEqual(lines.result, "'Hello custom eval World!'");
assert.strictEqual(lines.preview, undefined);
});
Expand All @@ -62,7 +62,7 @@ describe('with previews', () => {
);
const lines = getSingleCommandLines(output);
assert.match(lines.command, /^'Hello custom' \+ ' eval World!'/);
assert.match(lines.prompt, new RegExp(`${testingReplPrompt}$`));
assert.match(lines.prompt, new RegExp(`${RegExp.escape(testingReplPrompt)}$`));
assert.strictEqual(lines.result, "'Hello custom eval World!'");
assert.match(lines.preview, /'Hello custom eval World!'/);
});
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3190,11 +3190,10 @@ assert.strictEqual(
frame.replaceAll('/', '\\'))
).join('\n');
}
const escapedCWD = util.inspect(process.cwd()).slice(1, -1);
util.inspect(err, { colors: true }).split('\n').forEach(common.mustCallAtLeast((line, i) => {
let expected = stack[i].replace(/node_modules\/(@[^/]+\/[^/]+|[^/]+)/gi, (_, m) => {
return `node_modules/\u001b[4m${m}\u001b[24m`;
}).replaceAll(new RegExp(`(\\(?${escapedCWD}(\\\\|/))`, 'gi'), (_, m) => {
}).replaceAll(new RegExp(`(\\(?${RegExp.escape(process.cwd())}(\\\\|/))`, 'gi'), (_, m) => {
return `\x1B[90m${m}\x1B[39m`;
});
if (expected.includes(process.cwd()) && expected.endsWith(')')) {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-watch-mode-kill-signal-default.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ child.on('message', (msg) => {

await once(child, 'exit');

assert.match(stdout, new RegExp(`__SIGTERM received__ ${firstGrandchildPid}`));
assert.doesNotMatch(stdout, new RegExp(`__SIGINT received__ ${firstGrandchildPid}`));
assert.match(stdout, new RegExp(`__SIGTERM received__ ${RegExp.escape(firstGrandchildPid)}`));
assert.doesNotMatch(stdout, new RegExp(`__SIGINT received__ ${RegExp.escape(firstGrandchildPid)}`));
4 changes: 2 additions & 2 deletions test/parallel/test-watch-mode-kill-signal-override.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ await once(child, 'exit');
// The second grandchild, if there is one, could receive SIGTERM if it's killed as a
// consequence of the parent being killed in this process instead of being killed by the
// parent for file changes. Here we only care about the first grandchild.
assert.match(stdout, new RegExp(`__SIGINT received__ ${firstGrandchildPid}`));
assert.doesNotMatch(stdout, new RegExp(`__SIGTERM received__ ${firstGrandchildPid}`));
assert.match(stdout, new RegExp(`__SIGINT received__ ${RegExp.escape(firstGrandchildPid)}`));
assert.doesNotMatch(stdout, new RegExp(`__SIGTERM received__ ${RegExp.escape(firstGrandchildPid)}`));
4 changes: 2 additions & 2 deletions test/parallel/test-whatwg-webstreams-encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const kEuro = Buffer.from([0xe2, 0x82, 0xac]).toString();
() => Reflect.get(TextDecoderStream.prototype, getter, {}), {
name: 'TypeError',
message: /Cannot read private member/,
stack: new RegExp(`at get ${getter}`)
stack: new RegExp(`at get ${RegExp.escape(getter)}`)
}
);
});
Expand Down Expand Up @@ -79,7 +79,7 @@ const kEuro = Buffer.from([0xe2, 0x82, 0xac]).toString();
() => Reflect.get(TextDecoderStream.prototype, getter, {}), {
name: 'TypeError',
message: /Cannot read private member/,
stack: new RegExp(`at get ${getter}`)
stack: new RegExp(`at get ${RegExp.escape(getter)}`)
}
);
});
Expand Down