mocha-webpack icon indicating copy to clipboard operation
mocha-webpack copied to clipboard

Option to extend mocha.opts file

Open kristianmandrup opened this issue 7 years ago • 4 comments

Is there an --extend option to extend an existing mocha.opts file. Looks terrible to have two files that are mostly duplicated.

--extend mocha.opts

kristianmandrup avatar Nov 01 '16 15:11 kristianmandrup

I don't like the idea as it makes things more complicated.

A better option would be to replace the opts file with somethings that can node just require like a js or json file.

zinserjan avatar Dec 07 '16 17:12 zinserjan

@zinserjan Totally disagree.

As is typically the case with .*rc files - think eslint/babel - we can specify presets to use, thereby making configuration portable across projects, and reducing the uneccessary complication of having to configure a test environment on a per project basis.

jhchill666 avatar Mar 23 '17 08:03 jhchill666

I'm using a separate npm module to house my test setup, which is as easy as npm i test-setup -Ding it.

But providing defaults for mocha.opts in that project, and tailoring for the project requiring the default, is currently an ordeal.

jhchill666 avatar Mar 23 '17 09:03 jhchill666

I would also like this functionality, or the JSON one.

LeoDoldan7 avatar Jul 13 '20 17:07 LeoDoldan7