-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defend against console mocks in TAP reporter #1340
Comments
In trying to make a test case, I found that error handling generally does actually work fine. The problem was that in my specific test case, there was an active mock for the global Mocking the object from beforeEach/afterEach works fine. |
The asserted output is not what we'd like it to be. This is just to documnet what happens today. Ref #1340.
The asserted output is not what we'd like it to be. This is just to document what happens today. Ref #1340.
The asserted output is not what we'd like it to be. This is just to document what happens today. Ref #1340.
Perhaps we should save off references to the original functions in the logger? |
@trentmwillis Yeah, something like that. I haven't tried fixing it yet, but I assumed we'd have to do the ref-saving in js-reporters/TapReporter, rather than in qunit. But.. maybe we need both? |
Ah yes, that is correct. We should do it in both locations. |
Continuing at qunitjs/js-reporters#125. |
Fixes qunitjs#1340. Fixes qunitjs#1406. Fixes qunitjs#1555.
Fixes qunitjs#1340. Fixes qunitjs#1406. Fixes qunitjs#1407. Fixes qunitjs#1555.
Test case
What actually happened?
Notes
Note how there is nothing in the output other than
fail 1
. After I debugged the whole thing and realised thatcli()
didn't return a promise (Cannot read property 'then' of undefined")
, I did notice there is a tiny little clue.The clue is, number 6 is skipped in the output (it goes from 5 to 7). So in retrospect, I could've used that to find which test the problem is with, and maybe from there find out what the problem is.
Initially, though, I didn't even know where it was coming from.
The text was updated successfully, but these errors were encountered: