diff --git a/lib/reporters/html.js b/lib/reporters/html.js index c970fc05e9..7f4fa673fc 100644 --- a/lib/reporters/html.js +++ b/lib/reporters/html.js @@ -294,7 +294,7 @@ function makeUrl(s) { window.location.pathname + (search ? search + '&' : '?') + 'grep=' + - encodeURIComponent(escapeRe(s)) + encodeURIComponent(s) ); } @@ -304,7 +304,7 @@ function makeUrl(s) { * @param {Object} [suite] */ HTML.prototype.suiteURL = function (suite) { - return makeUrl(suite.fullTitle()); + return makeUrl('^' + escapeRe(suite.fullTitle()) + ' '); }; /** @@ -313,7 +313,7 @@ HTML.prototype.suiteURL = function (suite) { * @param {Object} [test] */ HTML.prototype.testURL = function (test) { - return makeUrl(test.fullTitle()); + return makeUrl('^' + escapeRe(test.fullTitle()) + '$'); }; /**