Test that afterEach is called after a failing spec.
This commit is contained in:
@@ -105,6 +105,19 @@ describe('RunnerTest', function() {
|
||||
expect(runnerResults.totalCount).toEqual(3);
|
||||
expect(runnerResults.passedCount).toEqual(3);
|
||||
});
|
||||
|
||||
it('should run after a failing spec', function () {
|
||||
var afterEach = jasmine.createSpy();
|
||||
env.afterEach(afterEach);
|
||||
|
||||
env.describe('suite', function () {
|
||||
env.it('fails', function () {
|
||||
this.explodes();
|
||||
});
|
||||
}).execute();
|
||||
|
||||
expect(afterEach).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user