Deprecate HtmlReporter and HtmlSpecFilter

This commit is contained in:
Steve Gravrock
2025-10-09 07:02:39 -07:00
parent 0ad54fc6f0
commit 9b3cc08818
6 changed files with 50 additions and 4 deletions

View File

@@ -3,12 +3,29 @@ describe('HtmlReporter', function() {
beforeEach(function() {
env = new privateUnderTest.Env();
spyOn(env, 'deprecated');
});
afterEach(function() {
env.cleanup_();
});
it('emits a deprecation warning', function() {
const container = document.createElement('div'),
getContainer = function() {
return container;
},
reporter = new jasmineUnderTest.HtmlReporter({
env: env,
getContainer: getContainer
});
reporter.initialize();
expect(env.deprecated).toHaveBeenCalledWith(
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
);
});
it('builds the initial DOM elements, including the title banner', function() {
const container = document.createElement('div'),
getContainer = function() {

View File

@@ -1,4 +1,15 @@
describe('HtmlSpecFilter', function() {
beforeEach(function() {
spyOn(jasmineUnderTest.getEnv(), 'deprecated');
});
it('emits a deprecation warning', function() {
new jasmineUnderTest.HtmlSpecFilter();
expect(jasmineUnderTest.getEnv().deprecated).toHaveBeenCalledWith(
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
);
});
it('should match when no string is provided', function() {
const specFilter = new jasmineUnderTest.HtmlSpecFilter();