nathanboktae / mocha-casperjs

Write CasperJS tests using Mocha
MIT License
120 stars 30 forks source link

Crashes terminal on Ubuntu/Git-Bash #89

Closed thehig closed 8 years ago

thehig commented 8 years ago

I've tried to reproduce the following error on a variety of systems. Thus far it has been reproduced on Windows 10 in the default cmd prompt, as well as the Git Bash shell and under vagrant/ubuntu.

After confirming that phantomjs@2.1.1 and casperjs@1.1.0-beta5 are installed correctly and globally (PATH), mocha-casperjs is installed globally.

Running mocha-casperjs at the prompt under cmd returns "the system cannot find the path specified". Running under Git Bash is a little different. When run in the 'wrong' folder it can't find any tests. When run in a folder with tests, nothing happens then the terminal usually goes to "Not Responding".

I thought this could be caused by something to do with Windows, so I figured I'd try again with a vagrant Ubuntu shell. After installing everything, I got the same output as Git Bash. It would tell me there were no tests if run in the "wrong" folder, but when run in a "correct" folder, the terminal would just freeze until Ctrl-C'd

Let me know if I can do anything to help debug

nathanboktae commented 8 years ago

run the "wrong" folder

You have to specify tests explicitly.

thehig commented 8 years ago

Ahh okay, going from the below, I thought it would pick up on the tests directory when run correctly, but the process just hangs. I'll try again tomorrow but this is becoming much more of a quagmire than I was hoping for

Like Mocha, if you place your tests in the test or tests directory, it will find them and run them. You can also specify tests to run individually instead.

nathanboktae commented 8 years ago

Ah yes it will include all tests in a directory yes. Did you try the Google test sample first?

Though phantomjs 2 and casperjs beta5 are untested by me... I need to add those test targets.

thehig commented 8 years ago

Yes I did, I get no output and everything just freezes up

nathanboktae commented 8 years ago

And what about a phantomjs example?

thehig commented 8 years ago

I've gotten everything working as expected under vagrant, but am still having trouble under windows. It seems as though the casperjs executable is spinning up a process then terminating. The results of the tests slowly come back to the terminal after casperjs has sent its return-code. This would imply this isn't your libs fault.

If you're interested in seeing what I'm talking about you can check out the project I've been working on here

nathanboktae commented 8 years ago

Closing this. Bash is now out for Windows 10 too.