Run afterAll fns after failure even if stopOnSpecFailure is true

[#160905297]
This commit is contained in:
Steve Gravrock
2021-10-08 14:19:56 -07:00
parent 976928c7ae
commit 25c3f06839
4 changed files with 64 additions and 0 deletions

View File

@@ -95,6 +95,23 @@ describe('CompleteOnFirstErrorSkipPolicy', function() {
policy.fnErrored(0);
expect(policy.skipTo(0)).toEqual(1);
});
it('does not skip afterAll fns, even if before the first cleanup fn index', function() {
const fns = [
{ fn: () => {} },
{
fn: () => {},
type: 'afterAll'
}
];
const policy = new jasmineUnderTest.CompleteOnFirstErrorSkipPolicy(
fns,
2
);
policy.fnErrored(0);
expect(policy.skipTo(0)).toEqual(1);
});
});
});
});