Considering the following setup in package.json
{
"scripts": {
"test": "coolcommand"
}
}
You would expect npm run test -- specs/myTest.spec.js
to pass the parameter into the coolcommand
, but unfortunately this is not always the case.
I initially thought that this may be the Windows/PS issue, but it turns out that the command is simply wrapped twice and doing double dash twice might actually help, for example:
npm run test -- -- specs/myTest.spec.js