sindresorhus / gulp-mocha

Run Mocha tests
MIT License
375 stars 91 forks source link

Fix regressions in v7 #197

Closed jlenoble closed 5 years ago

jlenoble commented 5 years ago

The upgrade to version 7.0.0 makes now use of execa option localDir. The latter package does now the actual call to npmRunPath.

But in order for the change to be seemless in gulp-mocha, the option preferLocal when calling execa must be set to true, otherwise the arrow function getEnv in execa will ignore it.

Moreover subprocess.stdout.pipe(subprocess.stdout); looked suspicious to me. I checked against gulp-mocha@6 and it used to be piped into process stdios. So I replaced piping subprocess stdios into themselves by their piping into process stdios.

npm run test didn't show any error after the changes, the 4 tests still pass.

Fixes #196

sindresorhus commented 5 years ago

Thanks for fixing this 🙌