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
Mocha has this lovely feature where you can add a mocha.opts file to the test folder, and when you run it, it will pick up this file if it exists and use the specified options when it runs. So for example, with ava often times I use the following options whenever I run it:
--require babel-core/register
--verbose
--serial
Now, usually these are wrapped up by the npm test command in package.json so I don't have to type them out often. But if I wanted to just run one of my test files instead of all of them because I'm just working on that feature, I'd want to point ava to that path, which means I'm running it from the command line. Then I need to go copy all these options or it won't run correctly.
For this use case specifically, having an ava.opts file would be awesome. Instead of typing out a massive command with all these options, you could just run ava tests/your_file.js and it would be off to the races.
Implementing this seems like it would be fairly straightforward -- just a check if that file exists and if so add to the options. It could even be json or yaml, that would also be fine. If you are ok with this feature, I'd be happy to write it and open up a PR, just wanted to check first!
The text was updated successfully, but these errors were encountered:
Mocha has this lovely feature where you can add a
mocha.opts
file to the test folder, and when you run it, it will pick up this file if it exists and use the specified options when it runs. So for example, with ava often times I use the following options whenever I run it:Now, usually these are wrapped up by the
npm test
command in package.json so I don't have to type them out often. But if I wanted to just run one of my test files instead of all of them because I'm just working on that feature, I'd want to point ava to that path, which means I'm running it from the command line. Then I need to go copy all these options or it won't run correctly.For this use case specifically, having an
ava.opts
file would be awesome. Instead of typing out a massive command with all these options, you could just runava tests/your_file.js
and it would be off to the races.Implementing this seems like it would be fairly straightforward -- just a check if that file exists and if so add to the options. It could even be json or yaml, that would also be fine. If you are ok with this feature, I'd be happy to write it and open up a PR, just wanted to check first!
The text was updated successfully, but these errors were encountered: