-
Notifications
You must be signed in to change notification settings - Fork 27
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
--include does not work when in 'opts' file [Bug] #73
Comments
It seems opts file is only parsed if you specify --opts arg. It no longer loads the file by default. This behavior is a deal breaker for me. I am using opt-file to point the correct webpack config when I run random tests from my IDE. Without it, I'd have to edit every run configuration manually. Too fiddly. |
Looks like I may have forgotten to include the opts file path here. Just needs @gdarai Would you be able to test this in your project to see if it fixes what you're getting here? @panta82 The |
@Jack-Barry The trick is that Webstorm IDE allows me to click a little "play" button next to unit tests and run them immediately in an ad-hoc fashion. And I couldn't figure out how to tell Webstorm to use a particular CLI arg when launching tests that way. So an opts file worked nicely for that. |
@Jack-Barry Yes, but this is a custom run configuration. You would create these for permanent things you would want to run all the time. Eg. "All tests", "All unit tests", etc. The problem is when I just want to run an ad-hoc individual test while working on a new code or debugging something. Sure I could click, see it crash, then edit the created run configuration, and then run again. But that's way more fiddly than just using the version of mocha that supports .opts. :) |
Hello! I'm wondering if the opts section could be removed from the documentation. Thanks for picking this up! |
@panta82 Forgive me if you are aware of this already, I appreciate this is months later, but you can edit the templates for ad-hoc run configurations in Webstorm - just look for the 'Templates' section in the list below your normal run configurations. Here you can select 'Mocha' for example, and then set the properties you wish to be inherited by all new run configurations created for Mocha inside that project. Hope this helps! |
What's the alternative for the |
Describe the bug
I am upgrading our libraries, so I swapped to mochapack and now I have an issue:
We are having global memory clearing method in cleanUpResources.js
Loading this file using
--include ./test/cleanupResources.js
also using parameter
--opts mochapack.opts
clear and concise description of what the bug is.
when I have the
include
inline directly it loads the cleanup file. When I have it in the opts file, it does not.To Reproduce
You can do the same thing I did... have an --include with some file and in it have afterEach with console.log and check the difference with inline and in opts solution.
Environment if relevant (please complete the following information):
├── [email protected]
├── [email protected]
└── [email protected]
Currently I am bypassing this using the inline solution.
The text was updated successfully, but these errors were encountered: