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

Support multiple entry files/patterns/directories #45

Closed
zinserjan opened this issue Aug 27, 2016 · 3 comments
Closed

Support multiple entry files/patterns/directories #45

zinserjan opened this issue Aug 27, 2016 · 3 comments

Comments

@zinserjan
Copy link
Owner

At the moment mocha-webpack supports only a single argument (file, directory or pattern).

We should support multiple entries to support the following cases:

Examples:

# run all test files in src & lib folder
mocha-webpack src/**/__test__/*.spec.js lib/**/__test__/*.spec.js

# run only a few tests
mocha-webpack test/es6/Browser.spec.js test/es6/ErrorHandler.spec.js src/templates/TemplateComponent.spec.js
@fairbairn
Copy link

+1

  • what would also be a nice feature is the ability to specify a file containing the specific test files to include in the bundle for execution.

mocha-webpack --bundle myfiles.txt

myfiles.txt

test/test1-spec.js
test/test3-spec.js
test/nested/someothertest.js

@arthurio
Copy link

arthurio commented Dec 2, 2016

@zinserjan This feature is exactly what we need to leverage circle ci test auto-balancing, do you have any estimate on when this would be available? If nothing has been planned yet, can you give me some guidance to make it happen? So far, from looking at the source code, it looks like the bulk of the changes need to happen in the prepareWebpack.js file and set the entry as a list of the files passed as arguments instead of using one file and setting the context with its path + the entry with its basename. Then I think what's left would be to update parseArgv.js and remove .demand(0, 1) on line #212.

@pkuczynski
Copy link
Contributor

pkuczynski commented Jun 30, 2017

This is at least in the scope of @zinserjan suggestion fixed in #79. Tested with "mocha-webpack": "1.0.0-beta.1", however I am encountering #115 issue in WebStorm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants