From 9afae3d9784e1c5001eb3ed04a0b5e4be2663ec7 Mon Sep 17 00:00:00 2001 From: Greg Cobb and Tim Jarratt Date: Thu, 28 Aug 2014 16:16:04 -0700 Subject: [PATCH] Add a test documenting fits in fdescribes Yo, this probably isn't the best behavior. Rspec and Ginkgo definitely do not exhibit this behavior when you nest focused runnables inside other focused runnables. We thought fixing it, but it seems like a nontrivial refactoring would be necessary to clean this up. [#73742944] --- spec/core/integration/SpecRunningSpec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec/core/integration/SpecRunningSpec.js b/spec/core/integration/SpecRunningSpec.js index c46793ce..cd9c1fdc 100644 --- a/spec/core/integration/SpecRunningSpec.js +++ b/spec/core/integration/SpecRunningSpec.js @@ -407,6 +407,25 @@ describe("jasmine spec running", function () { env.addReporter({jasmineDone: assertions}); env.execute(); }); + + it('runs fits in fdescribes twice', function(){ + var actions = []; + + env.fdescribe('focused suite', function() { + env.fit('focused spec', function() { + actions.push('focused spec') + }); + }); + + var assertions = function() { + var expected = ['focused spec', 'focused spec']; + expect(actions).toEqual(expected); + done(); + }; + + env.addReporter({jasmineDone: assertions}); + env.execute(); + }); }); it("shouldn't run disabled suites", function(done) {