From ddd97fe15c88aefe0475d6818e03c876d47aa37a Mon Sep 17 00:00:00 2001 From: Matt Woicik Date: Wed, 26 Jul 2017 17:30:54 -0400 Subject: [PATCH] test: fix error when foo in path to git clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/14506 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Reviewed-By: Vse Mozhet Byt --- test/parallel/test-assert-fail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-fail.js b/test/parallel/test-assert-fail.js index dac8ce49903f5f..f78725fefa503d 100644 --- a/test/parallel/test-assert-fail.js +++ b/test/parallel/test-assert-fail.js @@ -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) );