You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the test count is 91 (correct) and it measures the execution time at 0.702s.
However, if one of my tests errors, I get:
LOG: 'GLOBAL BEFORE'
LOG: 'BEFORE'
LOG: 'test 1'
LOG: 'AFTER'
LOG: 'GLOBAL AFTER'
LOG: 'GLOBAL BEFORE'
LOG: 'BEFORE'
LOG: 'test2'
LOG: 'AFTER'
LOG: 'GLOBAL AFTER'
LOG: 'GLOBAL BEFORE'
LOG: 'BEFORE'
LOG: 'test3'
PhantomJS 1.9.8 (Mac OS X 0.0.0) test 3 FAILED
TypeError: 'undefined' is not a function (evaluating 'this.foo()') (/Users/me/Projects/foo/test/tests.js:1212)
LOG: 'AFTER'
LOG: 'AFTER'
LOG: 'GLOBAL AFTER'
LOG: 'GLOBAL AFTER'
LOG: 'GLOBAL AFTER'
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 94 of 91 (3 FAILED) (0.969 secs / NaN secs)
Note now that after the failing "test 3" the nested afterEach is called twice, and the global afterEach is called 3 times!
Also it reports 94/91 tests now (cool, it ran 103% of my tests! :) ) and reports the execution time as NaN
I'll try to distill my actual test code into a sharable example to reproduce this behavior, but I suspect there is some weird edge case I've run into that will disappear as soon as I change anything...
The text was updated successfully, but these errors were encountered:
Not sure if this helps at all either, but with the HTML reporter / running in a browser, I see the same test triplicated (the 2 failures and last success are all the same test. there are actually only 3 tests not 5).
There is an error on the console, and it seems if you debug there, this.test.body is undefined.
Related to what I point out in my example github code from the previous comment, it is actually the 2nd test in that screenshot that is throwing the error, but it causes the 3rd test to fail... which then reports itself as 2 failures and 1 success.
I think I've stumbled into a weird edge case here.
I have global-level
beforeEach
andafterEach
handlers, as well as some nested in adescribe
, basically like this:It seems that if all my tests pass, I get the output
Note the test count is 91 (correct) and it measures the execution time at 0.702s.
However, if one of my tests errors, I get:
Note now that after the failing "test 3" the nested
afterEach
is called twice, and the globalafterEach
is called 3 times!Also it reports 94/91 tests now (cool, it ran 103% of my tests! :) ) and reports the execution time as
NaN
I'll try to distill my actual test code into a sharable example to reproduce this behavior, but I suspect there is some weird edge case I've run into that will disappear as soon as I change anything...
The text was updated successfully, but these errors were encountered: