Skip to content
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

Issues with testing with Chrome-headless #189

Open
Wolfgang51 opened this issue Mar 6, 2019 · 2 comments
Open

Issues with testing with Chrome-headless #189

Wolfgang51 opened this issue Mar 6, 2019 · 2 comments

Comments

@Wolfgang51
Copy link

Hey there, I am trying to run test using chrome-headless. Per the documentation I ran the following commands inside my project

npm install karma karma-cljs-test --save-dev
npm install -g karma-cli
npm install karma-chrome-launcher karma-firefox-launcher --save-dev

When I run my tests with lein doo chrome-headless test once I get the following error

;; ======================================================================
;; Testing with Chrome-headless:

'karma' is not recognized as an internal or external command,
operable program or batch file.
Subprocess failed

I checked to make sure all the modules exist and they do, they are located in ./npm-modules/. Moreover, I ran karma start inside the node_modules\.bin and it didn't throw an error. Any ideas?

@Wolfgang51
Copy link
Author

After some digging and debugging I found the issue was with Windows specifically. I have a suspicion that npm had updated and installs karma in a different directory that it used too. The reason I say that is that the setup of doo, karma and chrome-headless used to work for us. To fix our issue, we manually pointed doo to karma by adding the following to our project.clj

:paths {:karma "node_modules\\.bin\\karma"}

Note: the readme shows an example of this as

:doo {:paths {:karma "path/to/node_modules/karma/bin/karma"}}

This path will not work for windows so keep in mind that you need to use use escape characters for the windows path.

@bensu
Copy link
Owner

bensu commented Mar 11, 2019

Thank you! We should update the docs with that information, I will leave this issue open until we do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants