Skip afterEach fns in nested suites when a beforeEach fn errors

This matches the behavior of beforeAll errors.

* #1533
This commit is contained in:
Steve Gravrock
2021-10-01 16:36:36 -07:00
parent 5f1ef5ac2b
commit b67a3043c7
6 changed files with 178 additions and 56 deletions

View File

@@ -105,7 +105,7 @@ getJasmineRequireObj().Suite = function(j$) {
};
Suite.prototype.beforeEach = function(fn) {
this.beforeFns.unshift(fn);
this.beforeFns.unshift({ ...fn, suite: this });
};
Suite.prototype.beforeAll = function(fn) {
@@ -113,7 +113,7 @@ getJasmineRequireObj().Suite = function(j$) {
};
Suite.prototype.afterEach = function(fn) {
this.afterFns.unshift(fn);
this.afterFns.unshift({ ...fn, suite: this });
};
Suite.prototype.afterAll = function(fn) {