Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

[windows] fix spawn [..]\mocha ENOENT error #298

Merged
merged 1 commit into from
Jul 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/neutrino-preset-mocha/src/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = (mochaOpts = {}, babelOpts = {}, files = []) => new Promise((re
[...argv, `--${toParam(key)}`, value];
}, ['--require', require.resolve('./register')]);

proc = spawn(require.resolve('mocha/bin/mocha'), [...argv, ...files], {
proc = spawn(process.execPath, [require.resolve('mocha/bin/mocha'), ...argv, ...files], {
cwd: process.cwd(),
env: process.env,
stdio: 'inherit'
Expand Down