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
Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend avoiding the use of globally installed Mocha.
Description
When developing a third party reporter, mocha misdiagnoses an error coming from within the reporter as the reporter module not being found.
Create a custom reporter, that doesn't require mocha anywhere.
Install that reporter in the parent project (in this case, as a local package using the file location).
When mocha requires the reporter, node throws an error. The require works correctly, but mocha erroneously console.warns that the reporter wasn't found.
Expected behavior:
Mocha says that the reporter package caused the error.
Actual behavior:
Mocha erroneously console.warns that the reporter wasn't found.
Reproduces how often: 100%
Versions
Mocha version: 5.2.0 (not installed globally)
Node version: v8.11.1
OS: MacOs High Sierra v10.13.6
Shell: iTerm2 build 3.2.4beta2
Additional Information
As discussed in #3530, initially thought the package was not being required correctly.
The text was updated successfully, but these errors were encountered:
aido179
added a commit
to aido179/mocha
that referenced
this issue
Dec 4, 2018
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend avoiding the use of globally installed Mocha.Description
When developing a third party reporter, mocha misdiagnoses an error coming from within the reporter as the reporter module not being found.
Steps to Reproduce
Minimal reproduction
require
s the reporter, node throws an error. Therequire
works correctly, but mocha erroneouslyconsole.warn
s that the reporter wasn't found.Expected behavior:
Mocha says that the reporter package caused the error.
Actual behavior:
Mocha erroneously
console.warn
s that the reporter wasn't found.Reproduces how often: 100%
Versions
Mocha version: 5.2.0 (not installed globally)
Node version: v8.11.1
OS: MacOs High Sierra v10.13.6
Shell: iTerm2 build 3.2.4beta2
Additional Information
As discussed in #3530, initially thought the package was not being required correctly.
The text was updated successfully, but these errors were encountered: