Deprecate access to non-public Spec properties in spec filters

This commit is contained in:
Steve Gravrock
2025-09-14 11:34:06 -07:00
parent 6d77f3e7f0
commit 3cbf4dc27b
6 changed files with 125 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ getJasmineRequireObj().Runner = function(j$) {
#globalErrors;
#reportDispatcher;
#getConfig;
#deprecated;
#executedBefore;
#currentRunableTracker;
@@ -23,6 +24,7 @@ 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();
}
@@ -75,8 +77,9 @@ getJasmineRequireObj().Runner = function(j$) {
orderChildren: function(node) {
return order.sort(node.children);
},
excludeNode: function(spec) {
return !config.specFilter(spec);
excludeNode: spec => {
const proxy = j$.deprecatingSpecProxy(spec, this.#deprecated);
return !config.specFilter(proxy);
}
});
this.#executionTree = treeProcessor.processTree();