Tests are passing in CI and locally with node 0.10 but are failing under v8.4.0.
$ npm -v
5.4.0
$ node -v
v8.4.0
$ npm test
> [email protected] test /Users/tsertkov/Projects/exec-sh
> npm run cover-test && jshint
> [email protected] cover-test /Users/tsertkov/Projects/exec-sh
> istanbul cover --dir artifacts/coverage _mocha -- --reporter spec
exec-sh
module.exports
โ should export a single function
#execSh() arguments
โ should pass command to spawn function
โ should accept array of commands to run
โ should accept true as options argument
โ should merge defaults with options
โ should accept optional 'callback' parameter
1) should use 'cmd /C' command prefix on windows
โ should use 'sh -c' command prefix on *nix
โ should return spawn() result
โ should aggregate stdoout and stderr
โ should catch exceptions thrown by spawn
โ should return empty stdout and stderr when spawn throws
โ should run callback with error when shell exit with non-zero code
12 passing (19ms)
1 failing
1) exec-sh #execSh() arguments should use 'cmd /C' command prefix on windows:
AssertionError [ERR_ASSERTION]: 'sh' === 'cmd'
at context.<anonymous> (/Users/tsertkov/Projects/exec-sh/test/exec-sh.js:98:14)
at callFn (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runnable.js:250:21)
at Test.Runnable.run (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runnable.js:243:7)
at Runner.runTest (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:373:10)
at /Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:451:12
at next (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:298:14)
at /Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:308:7
at next (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:246:23)
at /Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:270:7
at done (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runnable.js:206:5)
at callFn (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runnable.js:261:7)
at Hook.Runnable.run (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runnable.js:243:7)
at next (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:258:10)
at Immediate.<anonymous> (/Users/tsertkov/Projects/exec-sh/node_modules/mocha/lib/runner.js:275:5)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
$ npm -v
2.15.1
$ node -v
v.0.10.48
$ npm test
> [email protected] test /Users/tsertkov/Projects/exec-sh
> npm run cover-test && npm run jshint
> [email protected] cover-test /Users/tsertkov/Projects/exec-sh
> istanbul cover --dir artifacts/coverage _mocha -- --reporter spec
exec-sh
module.exports
โ should export a single function
#execSh() arguments
โ should pass command to spawn function
โ should accept array of commands to run
โ should accept true as options argument
โ should merge defaults with options
โ should accept optional 'callback' parameter
โ should use 'cmd /C' command prefix on windows
โ should use 'sh -c' command prefix on *nix
โ should return spawn() result
โ should aggregate stdoout and stderr
โ should catch exceptions thrown by spawn
โ should return empty stdout and stderr when spawn throws
โ should run callback with error when shell exit with non-zero code
13 passing (29ms)