Skip to content
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

"invalid reporter" unit test passes the wrong way in a browser #4469

Closed
boneskull opened this issue Oct 8, 2020 · 0 comments
Closed

"invalid reporter" unit test passes the wrong way in a browser #4469

boneskull opened this issue Oct 8, 2020 · 0 comments
Assignees
Labels

Comments

@boneskull
Copy link
Member

@boneskull boneskull commented Oct 8, 2020

there's a few tests in test/unit/mocha.spec.js which attempt to require() a reporter fixture. these are running in the browser, but can't really run in the browser, because rollup does not support dynamic requires.

like this

the tests pass, because the code is expected to throw an exception; it's just not the exception we expected.

this could be addressed by one of:

  • easy: creating test/node-unit/reporter.spec.js and moving the those tests into it
  • less easy: rewriting as an integration test in test/integration/options/reporter.spec.js
  • hard: using some magic to stub require() so it doesn't actually try to load a file (I am not sure how to pull this off, especially in a rollup bundle)
@boneskull boneskull self-assigned this Oct 13, 2020
boneskull added a commit that referenced this issue Oct 13, 2020
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
@boneskull boneskull linked a pull request that will close this issue Oct 13, 2020
boneskull added a commit that referenced this issue Oct 14, 2020
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.