-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
HTML Reporter does not report all errors #361
Comments
let me know if you find something i can reproduce and i'll check it out too, seems ok |
You can reproduce it with this (off master btw): describe("Foo", function(){
describe("fooz", function(){
beforeEach(function(){
//this should not be a function.
Amzoo.call();
});
it("should die", function(){
});
});
it("should work", function(){
});
}); You will see in node reporters (spec, list, etc..) you will see a Reference error about When I looked into it it seems like the error is not marked The other reports don't seem to handle this logic the same way essentially they just output an error on .fail (or save each occurrence of an error for later). |
I should note the issue only effects errors caused in hooks (before, beforeEach, after, afterEach) |
I'm seeing the same issue. It appears that the function assigned to window.onerror is never invoked. |
reproduced, thanks @lightsofapollo, I'll take a look in a bit |
we just were not displaying the hook errors, that should be fine |
Nice thanks, that is a much simpler fix then what I was thinking. |
This includes a fix for mochajs/mocha#361, fixing #31.
First off, thanks for Mocha, I have been using it over jasmine for my node projects for awhile now.
I just started to need it for a major new project that lives in the client side and I noticed that the HTML reporter does not seem to be reporting all of the errors.
For example when referencing a variable that does not exist, etc...
After digging into it I found that these errors are actually thrown but are not marked as "uncaught" see: https://github.com/visionmedia/mocha/blob/master/lib/reporters/html.js#L81
Might suggest a deeper problem.
I was testing in Safari 5.1.4 and Firefox Aurora (latest).
I will try to dig into it and submit a pull request...
The text was updated successfully, but these errors were encountered: