-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Mocha anonymizes Errors in beforeEach/afterEach #47
Comments
Not sure if there is anything to be done here? If it's a mocha issue, then this should be filed in the mocha repo. |
I just had the same problem. |
Is this just occasionally or reproducible? If it's reproducible, can someone facing this issue please create a plain meteor project and re-create the problem there and provide a link to the repository here? This would help me analyzing this problem ... Make sure you already have the latest version of this package as well as |
Happens every time, here's a quick repro: Pretty sure this is a mocha issue.
|
Digging a bit further, this was fixed loooong ago in mocha, and fixed in The repro is fixed after a simple So it seems the issue that people are running into is that Meteor installs Would there be unwanted side-effects if you bumped the required version of |
The only side-effect I saw is that you can't use But (as I also said in the referenced ticket) since the project My advice: Use puppeteer instead of I'll close this issue here as it's fixed long ago. If you sincerely need a specific version of mocha, please open an issue at https://github.com/meteortesting/meteor-mocha-core mentioning the version of mocha you need and I'll see what I can do. |
I am currently setting up a testing environment for a project. Upon writing the very first test I received a very vague error:
I was for a long time unable to find out the problem, but after a while found out that this error gets thrown because I made a very simple and small mistake in the beforeEach function. In my code the mistake was handled by a custom error which is very specific and was made to help developing easier. Somehow Mocha translated it into the above error.
I tried testing a bit more why I got that error instead of my own error. The code of Mocha was complex, but it looks it has something to do with the error being caught, but the message not being passed well between functions so that once the clean function gets called the
str
parameter isundefined
.The text was updated successfully, but these errors were encountered: