I'm currently using a gulp task to test a project. This runs tasks using the following tools:
- Karma (async)
- Protractor (spawned process)
- ESlint (using
gulp-eslint) - HTMLHint (using
gulp-htmlhint) - Stylelint (using
gulp-postcss)
The task fails if any of these tasks failed.
All of these tools have perfectly fine cli interfaces. So I decided I'd like to run these tools using an npm test script instead.
For simplicitly let's say all tools run by simply invoking them without any flags. Then this can be done using:
{
...
"scripts": {
"test": "karma && protractor && eslint && htmlhint && stylelint"
},
...
}
However, this means that if karma fails, none of the other tools will run.
Is it possible to create a setup where all of these tools will run, but npm test will fail if any of the commands failed?