Clone HtmlSpecFilter and HtmlReporter in preparation for backward-incompatible changes

This commit is contained in:
Steve Gravrock
2025-10-07 20:38:01 -07:00
parent bd89ef66c8
commit 77c3b8b07e
12 changed files with 2143 additions and 95 deletions

View File

@@ -53,7 +53,9 @@ describe('The jasmine namespace', function() {
if (typeof window !== 'undefined') {
// jasmine-html.js
result.add('HtmlReporter');
result.add('HtmlReporterV2');
result.add('HtmlSpecFilter');
result.add('HtmlSpecFilterV2');
result.add('QueryString');
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
describe('jasmineUnderTest.HtmlSpecFilter', function() {
describe('HtmlSpecFilter', function() {
it('should match when no string is provided', function() {
const specFilter = new jasmineUnderTest.HtmlSpecFilter();

View File

@@ -0,0 +1,19 @@
describe('HtmlSpecFilterV2', function() {
it('should match when no string is provided', function() {
const specFilter = new jasmineUnderTest.HtmlSpecFilterV2();
expect(specFilter.matches('foo')).toBe(true);
expect(specFilter.matches('*bar')).toBe(true);
});
it('should only match the provided string', function() {
const specFilter = new jasmineUnderTest.HtmlSpecFilterV2({
filterString: function() {
return 'foo';
}
});
expect(specFilter.matches('foo')).toBe(true);
expect(specFilter.matches('bar')).toBe(false);
});
});