diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 0dc988b7..37135702 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1499,8 +1499,7 @@ getJasmineRequireObj().Env = function(j$) { runQueue, TreeProcessor: j$.TreeProcessor, globalErrors, - getConfig: () => config, - deprecated: this.deprecated + getConfig: () => config }); this.setParallelLoadingState = function(state) { @@ -9445,7 +9444,6 @@ getJasmineRequireObj().Runner = function(j$) { #globalErrors; #reportDispatcher; #getConfig; - #deprecated; #executedBefore; #currentRunableTracker; @@ -9459,7 +9457,6 @@ getJasmineRequireObj().Runner = function(j$) { this.#globalErrors = options.globalErrors; this.#reportDispatcher = options.reportDispatcher; this.#getConfig = options.getConfig; - this.#deprecated = options.deprecated; this.#executedBefore = false; this.#currentRunableTracker = new j$.CurrentRunableTracker(); } @@ -9512,9 +9509,8 @@ getJasmineRequireObj().Runner = function(j$) { orderChildren: function(node) { return order.sort(node.children); }, - excludeNode: spec => { - const proxy = j$.deprecatingSpecProxy(spec, this.#deprecated); - return !config.specFilter(proxy); + excludeNode: function(spec) { + return !config.specFilter(spec.metadata); } }); this.#executionTree = treeProcessor.processTree(); diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index df431c65..542fd7e2 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -925,40 +925,6 @@ describe('Env integration', function() { expect(suiteCallback).toHaveBeenCalled(); }); - it('reports a deprecation warning when a spec filter accesses private properties', async function() { - env.it('a spec', function() {}); - - const reporter = jasmine.createSpyObj('reporter', ['jasmineDone']); - env.addReporter(reporter); - - env.configure({ - random: false, - specFilter: function(spec) { - spec.result; // deprecated - spec.id; // not deprecated - spec.description; // not deprecated - spec.getPath(); // not deprecated - spec.getFullName(); // not deprecated - return true; - } - }); - - spyOn(console, 'error'); - await env.execute(); - - expect(reporter.jasmineDone).toHaveBeenCalledWith( - jasmine.objectContaining({ - deprecationWarnings: [ - jasmine.objectContaining({ - message: jasmine.stringContaining( - 'Access to private Spec members (in this case `result`)' - ) - }) - ] - }) - ); - }); - it('Functions can be spied on and have their calls tracked', async function() { let originalFunctionWasCalled = false; const subject = { diff --git a/src/core/Env.js b/src/core/Env.js index 3e4fb741..701b4586 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -371,8 +371,7 @@ getJasmineRequireObj().Env = function(j$) { runQueue, TreeProcessor: j$.TreeProcessor, globalErrors, - getConfig: () => config, - deprecated: this.deprecated + getConfig: () => config }); this.setParallelLoadingState = function(state) { diff --git a/src/core/Runner.js b/src/core/Runner.js index 0a715a55..8e06e8b6 100644 --- a/src/core/Runner.js +++ b/src/core/Runner.js @@ -10,7 +10,6 @@ getJasmineRequireObj().Runner = function(j$) { #globalErrors; #reportDispatcher; #getConfig; - #deprecated; #executedBefore; #currentRunableTracker; @@ -24,7 +23,6 @@ getJasmineRequireObj().Runner = function(j$) { this.#globalErrors = options.globalErrors; this.#reportDispatcher = options.reportDispatcher; this.#getConfig = options.getConfig; - this.#deprecated = options.deprecated; this.#executedBefore = false; this.#currentRunableTracker = new j$.CurrentRunableTracker(); } @@ -77,9 +75,8 @@ getJasmineRequireObj().Runner = function(j$) { orderChildren: function(node) { return order.sort(node.children); }, - excludeNode: spec => { - const proxy = j$.deprecatingSpecProxy(spec, this.#deprecated); - return !config.specFilter(proxy); + excludeNode: function(spec) { + return !config.specFilter(spec.metadata); } }); this.#executionTree = treeProcessor.processTree();