-
Notifications
You must be signed in to change notification settings - Fork 15
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 --opts not working anymore #7
Comments
I have observed the exact same behavior with Jest. Having See jestjs/jest#9379 for my original report assuming Jest would be the culprit. It contains steps to reproduce the issue from the failing commits from my Travis-CI pipeline. |
I just tried with
|
Removing the only |
I think the culprit is the design of the module as a mix of CLI and programmatic library all in one. I have no experience with the
If this would be extracted into its own file - which then serves for the CLI use case - the programmatic use case would import the actual validator only but not the CLI code. |
✅ The problem can be bypassed by programmatically importing |
(workaround for ketanSaxena/schema-validator#7)
thanks @bkimminich for coming up with this. It can work as a temporary workaround till I mitigate the root cause. |
I'm using Node 10, 12 and 13 in my project and they all had this problem. |
Same error here running
|
As soon as I include
"yaml-schema-validator": "^1.1.9"
in mypackage.json
andnpm install
it,mocha --opts mocha.opts
fails with this error message:My project has these dependencies:
If I remove
yaml-schema-validator
, the commandmocha --opts mocha.opts
runs all tests as expected.The problematic behavior is observed regardless of platform, it's the same on Linux, Windows, or macOS. Node.js version 10.16.3 was used.
The text was updated successfully, but these errors were encountered: