Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32f905a

Browse filesBrowse files
vperezmaMylesBorins
authored andcommitted
test: improve test-process-chdir
remove typeError constructor and replace with regex string to match typeError message PR-URL: #12589 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Cai <davidcai1993@yahoo.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 51794dd commit 32f905a
Copy full SHA for 32f905a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-process-chdir.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-chdir.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ process.chdir('..');
3030
assert.strictEqual(process.cwd().normalize(),
3131
path.resolve(common.tmpDir).normalize());
3232

33-
assert.throws(function() { process.chdir({}); }, TypeError, 'Bad argument.');
34-
assert.throws(function() { process.chdir(); }, TypeError, 'Bad argument.');
33+
assert.throws(function() { process.chdir({}); },
34+
/^TypeError: Bad argument\.$/, 'Bad argument.');
35+
assert.throws(function() { process.chdir(); },
36+
/^TypeError: Bad argument\.$/, 'Bad argument.');
3537
assert.throws(function() { process.chdir('x', 'y'); },
36-
TypeError, 'Bad argument.');
38+
/^TypeError: Bad argument\.$/, 'Bad argument.');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.