afterEach not called if defaultTimeoutInterval reached in beforeEach #291

Open
kprantis opened this Issue Feb 25, 2014 · 0 comments

Comments

Projects
None yet
1 participant

afterEach does not appear to be called if a beforeEach fails out due to reaching the defaultTimeoutInterval limit. afterEach is often used to cleanup after a test before starting the next test and/or to gather information useful to debug failures, so it seems reasonable to me that this should still be executing.

More specifics on our case: Our tests have a beforeEach and afterEach. The beforeEach sets up for the test, the afterEach gathers some extra information on what the state was at the end of the test for us to use in debugging failures. Due to the app under test legitly taking too long to execute, we hit the defaultTimeoutInterval during the beforeEach, and were surprised to find our afterEach was not executed at all, which we confirmed by having a console.log() at the start of the afterEach to note when it executes .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment