From 418393c496b22872934ea7ea54334833bafa01c8 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sun, 28 Sep 2025 08:55:47 -0700 Subject: [PATCH] rm more vestiges of suite re-entry support --- lib/jasmine-core/jasmine.js | 4 ---- spec/core/RunnerSpec.js | 3 --- spec/core/TreeProcessorSpec.js | 44 ---------------------------------- src/core/Suite.js | 4 ---- 4 files changed, 55 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 4d88e1d7..f4d804e5 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -10766,10 +10766,6 @@ getJasmineRequireObj().Suite = function(j$) { return this.result; } - canBeReentered() { - return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0; - } - sharedUserContext() { if (!this.sharedContext) { this.sharedContext = this.parentSuite diff --git a/spec/core/RunnerSpec.js b/spec/core/RunnerSpec.js index c3cb65b0..83f324b0 100644 --- a/spec/core/RunnerSpec.js +++ b/spec/core/RunnerSpec.js @@ -33,9 +33,6 @@ describe('Runner', function() { attrs = attrs || {}; this.id = 'suite' + suiteNumber++; this.children = attrs.children || []; - this.canBeReentered = function() { - return !attrs.noReenter; - }; this.markedPending = attrs.markedPending || false; this.sharedUserContext = function() { return attrs.userContext || {}; diff --git a/spec/core/TreeProcessorSpec.js b/spec/core/TreeProcessorSpec.js index 699be65c..b4ac43c4 100644 --- a/spec/core/TreeProcessorSpec.js +++ b/spec/core/TreeProcessorSpec.js @@ -6,9 +6,6 @@ describe('TreeProcessor', function() { attrs = attrs || {}; this.id = 'node' + nodeNumber++; this.children = attrs.children || []; - this.canBeReentered = function() { - return !attrs.noReenter; - }; this.markedPending = attrs.markedPending || false; this.sharedUserContext = function() { return attrs.userContext || {}; @@ -195,47 +192,6 @@ describe('TreeProcessor', function() { expect(result.isExcluded(childOfPending)).toEqual(false); }); - it('throws if the specified order would re-enter a node', function() { - const leaf1 = new Leaf(), - leaf2 = new Leaf(), - leaf3 = new Leaf(), - reentered = new Node({ noReenter: true, children: [leaf1, leaf2] }), - root = new Node({ children: [reentered, leaf3] }), - processor = new privateUnderTest.TreeProcessor({ - tree: root, - runnableIds: [leaf1.id, leaf3.id, leaf2.id] - }); - - expect(function() { - processor.processTree(); - }).toThrowError('Invalid order: would split up a suite'); - }); - - it("does not throw if a node which can't be re-entered is only entered once", function() { - const leaf1 = new Leaf(), - leaf2 = new Leaf(), - leaf3 = new Leaf(), - noReentry = new Node({ noReenter: true }), - root = new Node({ children: [noReentry] }), - processor = new privateUnderTest.TreeProcessor({ - tree: root, - runnableIds: [leaf2.id, leaf1.id, leaf3.id] - }); - - processor.processTree(); - }); - - it("does not throw if a node which can't be re-entered is run directly", function() { - const noReentry = new Node({ noReenter: true }), - root = new Node({ children: [noReentry] }), - processor = new privateUnderTest.TreeProcessor({ - tree: root, - runnableIds: [root.id] - }); - - processor.processTree(); - }); - it('orders children according to orderChildren when specified', function() { const leaf1 = new Leaf(); const leaf2 = new Leaf(); diff --git a/src/core/Suite.js b/src/core/Suite.js index 96eabe2c..c7b63e56 100644 --- a/src/core/Suite.js +++ b/src/core/Suite.js @@ -162,10 +162,6 @@ getJasmineRequireObj().Suite = function(j$) { return this.result; } - canBeReentered() { - return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0; - } - sharedUserContext() { if (!this.sharedContext) { this.sharedContext = this.parentSuite