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

Exclude a single file? #124

Closed
ghost opened this issue Mar 17, 2017 · 1 comment
Closed

Exclude a single file? #124

ghost opened this issue Mar 17, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 17, 2017

mocha-webpack.opts:

--webpack-config ./config/webpack/tests.js
--full-trace
src/**/*.ts

Inside src/ there is a file called server.ts which fires an express server, and runs at the background.

So we don't want this and this file only to be excluded. Is there a way to configure mocha-webpack to exclude this file?

@ghost
Copy link
Author

ghost commented Mar 20, 2017

Couldn't work it out from the docs, but a rubber duck suggested it and it worked:

--webpack-config ./config/webpack/tests.js
--full-trace
src/**/!(server).ts

The discussion on globs confounded things, perhaps the example above can be added to the docs?

@ghost ghost closed this as completed Mar 20, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants