Skip to content

Commit ddd97fe

Browse files
SwimmingSageaddaleax
authored andcommitted
test: fix error when foo in path to git clone
I fixed an error that occured in the test case of the file test/parallel/test-assert-fail.js when foo was in the path to the git clone. This occured due to a regex that looked only for the word foo, and so it was updated to not look for foo/, but only foo. This way it won't go off from foo being in the path to the git clone PR-URL: #14506 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
1 parent 2c364ab commit ddd97fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-assert-fail.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ assert.throws(
7171
// The stackFrameFunction should exclude the foo frame
7272
assert.throws(
7373
function foo() { assert.fail('first', 'second', 'message', '!==', foo); },
74-
(err) => !/foo/m.test(err.stack)
74+
(err) => !/^\s*at\sfoo\b/m.test(err.stack)
7575
);

0 commit comments

Comments
 (0)