Skip to content

Commit

Permalink
test: fix error when foo in path to git clone
Browse files Browse the repository at this point in the history
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 <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
  • Loading branch information
SwimmingSage authored and addaleax committed Aug 1, 2017
1 parent 2c364ab commit ddd97fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-assert-fail.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ assert.throws(
// The stackFrameFunction should exclude the foo frame
assert.throws(
function foo() { assert.fail('first', 'second', 'message', '!==', foo); },
(err) => !/foo/m.test(err.stack)
(err) => !/^\s*at\sfoo\b/m.test(err.stack)
);

0 comments on commit ddd97fe

Please sign in to comment.