zinserjan / mocha-webpack

mocha test runner with integrated webpack precompiler
http://zinserjan.github.io/mocha-webpack/
MIT License
486 stars 75 forks source link

[Feature request] Add possibility to passing multiple configs as an Array #193

Open pumano opened 6 years ago

pumano commented 6 years ago

I want to try mocha-webpack with electron (spectron) for e2e testing. I have 2 entry points in webpack config. After trying: mocha-webpack I got error message:

C:\Repository\myproject\node_modules\mocha-webpack\lib\cli\requireWebpackConfig.js:130
    throw new Error('Passing multiple configs as an Array is not supported. Please provide a single config instead.');
          ^
Error: Passing multiple configs as an Array is not supported. Please provide a single config instead.
    at requireWebpackConfig (C:\Repository\myproject\node_modules\mocha-webpack\lib\cli\requireWebpackConfig.js:130:11)
    at Object.<anonymous> (C:\Repository\myproject\node_modules\mocha-webpack\lib\cli\index.js:70:60)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Repository\myproject\node_modules\mocha-webpack\bin\mocha-webpack:2:1)

Could you please add support for multiple configs as Array?

jmariller commented 4 years ago

Thanks @pumano , I would also be interested in such a feature!