diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 74bfe154..b2fcceda 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1610,7 +1610,7 @@ getJasmineRequireObj().Env = function(j$) { var queueRunnerFactory = function(options, args) { var failFast = false; if (options.isLeaf) { - failFast = config.stopSpecOnExpectationFailure; + failFast = true; } else if (!options.isReporter) { failFast = config.stopOnSpecFailure; } diff --git a/spec/core/integration/SpecRunningSpec.js b/spec/core/integration/SpecRunningSpec.js index b275ed22..52d8ab32 100644 --- a/spec/core/integration/SpecRunningSpec.js +++ b/spec/core/integration/SpecRunningSpec.js @@ -983,7 +983,7 @@ describe('spec running', function() { }); describe('When stopSpecOnExpectationFailure is false', function() { - it('does not skip anything after a thrown error', async function() { + it('skips to cleanup functions after a thrown error', async function() { var actions = []; env.describe('Something', function() { @@ -1015,14 +1015,12 @@ describe('spec running', function() { expect(actions).toEqual([ 'outer beforeEach', - 'inner beforeEach', - 'inner it', 'inner afterEach', 'outer afterEach' ]); }); - it('does not skip anything after a rejected promise', async function() { + it('skips to cleanup functions after a rejected promise', async function() { var actions = []; env.describe('Something', function() { @@ -1054,8 +1052,6 @@ describe('spec running', function() { expect(actions).toEqual([ 'outer beforeEach', - 'inner beforeEach', - 'inner it', 'inner afterEach', 'outer afterEach' ]); @@ -1100,7 +1096,7 @@ describe('spec running', function() { ]); }); - it('does not skip anything after done.fail is called', async function() { + it('skips to cleanup functions after done.fail is called', async function() { var actions = []; env.describe('Something', function() { @@ -1120,10 +1116,10 @@ describe('spec running', function() { await env.execute(); - expect(actions).toEqual(['beforeEach', 'it', 'afterEach']); + expect(actions).toEqual(['beforeEach', 'afterEach']); }); - it('does not skip anything when an async function times out', async function() { + it('skips to cleanup functions when an async function times out', async function() { var actions = []; env.describe('Something', function() { @@ -1142,7 +1138,7 @@ describe('spec running', function() { await env.execute(); - expect(actions).toEqual(['beforeEach', 'it', 'afterEach']); + expect(actions).toEqual(['beforeEach', 'afterEach']); }); it('runs all reporter callbacks even if one fails', async function() { diff --git a/src/core/Env.js b/src/core/Env.js index 0dd7930e..c6c53950 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -504,7 +504,7 @@ getJasmineRequireObj().Env = function(j$) { var queueRunnerFactory = function(options, args) { var failFast = false; if (options.isLeaf) { - failFast = config.stopSpecOnExpectationFailure; + failFast = true; } else if (!options.isReporter) { failFast = config.stopOnSpecFailure; }