Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove unneeded m flag on regular expressions #38124

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ const child = spawnSync(process.execPath, [
'--expose-gc', __filename, 'child',
]);
assert.strictEqual(child.signal, null);
assert.match(child.stderr.toString(), /Error during Finalize/m);
assert.match(child.stderr.toString(), /Error during Finalize/);
2 changes: 1 addition & 1 deletion test/parallel/test-readline-async-iterators.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function testSimple() {
expectedLines.pop();
}
assert.deepStrictEqual(iteratedLines, expectedLines);
assert.strictEqual(iteratedLines.join(''), fileContent.replace(/\n/gm, ''));
assert.strictEqual(iteratedLines.join(''), fileContent.replace(/\n/g, ''));
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/report/test-report-uv-handles.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ if (process.argv[2] === 'child') {

// Test libuv handle key order
{
const get_libuv = /"libuv":\s\[([\s\S]*?)\]/gm;
const get_handle_inner = /{([\s\S]*?),*?}/gm;
const get_libuv = /"libuv":\s\[([\s\S]*?)\]/g;
const get_handle_inner = /{([\s\S]*?),*?}/g;
const libuv_handles_str = get_libuv.exec(stdout)[1];
const libuv_handles_array = libuv_handles_str.match(get_handle_inner);
for (const i of libuv_handles_array) {
// Exclude nested structure
if (i.includes('type')) {
const handle_keys = i.match(/(".*"):/gm);
const handle_keys = i.match(/(".*"):/g);
assert(handle_keys[0], 'type');
assert(handle_keys[1], 'is_active');
}
Expand Down