-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mocha not working under windows #605
Comments
@steffen from GH wants to have a look at this issue. |
I'm not sure about this, maybe report to Mocha instead of Octotree? |
I don't think opening a bug report against Mocha makes sense here. Have you tried to reproduce the problem under windows? |
I see. Sorry I missed it. I haven't maintained the test for a while though (Selenium tests are too flaky to be fun), so this command is probably unused for a while. Gonna review the PR. |
Description
When building octotree on Windows 10 and then executing the tests, test execution will fail with an error message "Error: spawn ./node_modules/.bin/mocha ENOENT". That is under Windows, it cannot find the shell script for mocha.
Obviously, the library spawn/child_process does not support Windows executables (e.g. transperently invoking them by trying to attach the extension .exe, .com, or .cmd in case the filepath is not available).
Expected solution:
For Windows environments, use path to ".\node_modules.bin\mocha.cmd"
Otherwise, use path "./node_modules/.bin/mocha"
(I opened PR #606 for fixing this issue).
This solution is supported by other issues:
nodejs/node-v0.x-archive#2318 (comment)
https://stackoverflow.com/a/39682805/1703453
Environment (if bug)
Octotree version:
v2.5.1
commit dca1cfb (master)
Tue Jan 15 05:53:22 2019 +0300
Browser & version:
N/A
OS & version:
Screenshot, if any (drag an image here)
N/A
Console error log below this line
[14:25:05] Using gulpfile D:\projects\trial\octotree\gulpfile.js
[14:25:05] Starting 'build'...
gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.
[14:25:05] Starting 'clean'...
[14:25:06] Finished 'clean' after 138 ms
[14:25:06] Starting 'styles'...
[14:25:06] Finished 'styles' after 471 ms
[14:25:06] Starting 'chrome:template'...
[14:25:06] Starting 'lib:ondemand'...
[14:25:06] Finished 'lib:ondemand' after 2.96 ms
[14:25:06] Finished 'chrome:template' after 103 ms
[14:25:06] Starting 'chrome:js'...
[14:25:06] Finished 'chrome:js' after 96 ms
[14:25:06] Starting 'chrome'...
[14:25:06] Finished 'chrome' after 126 ms
[14:25:06] Starting 'chrome:template'...
[14:25:06] Starting 'lib:ondemand'...
[14:25:06] Finished 'lib:ondemand' after 2.27 ms
[14:25:06] Finished 'chrome:template' after 13 ms
[14:25:06] Starting 'chrome:js'...
[14:25:06] Finished 'chrome:js' after 42 ms
[14:25:06] Starting 'chrome'...
[14:25:07] Finished 'chrome' after 78 ms
[14:25:07] Starting 'opera'...
[14:25:07] Finished 'opera' after 92 ms
[14:25:07] Starting 'safari:template'...
[14:25:07] Starting 'lib:ondemand'...
[14:25:07] Finished 'lib:ondemand' after 2.11 ms
[14:25:07] Finished 'safari:template' after 13 ms
[14:25:07] Starting 'safari:js'...
[14:25:07] Finished 'safari:js' after 31 ms
[14:25:07] Starting 'safari'...
[14:25:07] Finished 'safari' after 78 ms
[14:25:07] Starting 'firefox:template'...
[14:25:07] Starting 'lib:ondemand'...
[14:25:07] Finished 'lib:ondemand' after 2.03 ms
[14:25:07] Finished 'firefox:template' after 10 ms
[14:25:07] Starting 'firefox:js'...
[14:25:07] Finished 'firefox:js' after 29 ms
[14:25:07] Starting 'firefox'...
[14:25:07] Finished 'firefox' after 77 ms
[14:25:07] Finished 'build' after 1.42 s
[14:25:07] Starting 'test'...
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn ./node_modules/.bin/mocha ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:
gulp test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users<userid>\AppData\Roaming\npm-cache_logs\2019-01-15T13_25_07_392Z-debug.log
The text was updated successfully, but these errors were encountered: