Clicking a link in the HTML reporter does exact filtering

This feature requires an update to boot1.js, as shown in this commit.
Users with an older boot1.js will get the older inexact filtering.
This commit is contained in:
Steve Gravrock
2025-09-16 21:03:16 -07:00
parent 4ccc7bf3ac
commit 8309416cb2
10 changed files with 231 additions and 52 deletions

View File

@@ -1,9 +1,16 @@
jasmineRequire.HtmlSpecFilter = function() {
// Legacy HTML spec filter, preserved for backward compatibility with
// boot files that predate HtmlExactSpecFilterV2
function HtmlSpecFilter(options) {
const filterString =
options &&
options.filterString() &&
options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
let filterString = (options && options.filterString()) || '';
if (filterString.startsWith('[')) {
// Convert an HtmlExactSpecFilterV2 string into something we can use
filterString = JSON.parse(filterString).join(' ');
}
filterString = filterString.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
const filterPattern = new RegExp(filterString);
this.matches = function(specName) {