nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs
MIT License
954 stars 112 forks source link

Example test harness html is misleading. #234

Closed ksmith97 closed 8 years ago

ksmith97 commented 8 years ago

I understand that the example test harness file is just a starting place but it was confusing to me when trying to make things work for the first time. A more stripped down version with links to a cdn for the resources might make this example much clearer in where it needs to get its resources from.
I also think it might be broken as I had to use mocha.setup('bdd') instead of mocha.ui. For those of us struggling to get something started being able to copy the example and have it just work would be helpful!

nathanboktae commented 8 years ago

I had to use mocha.setup('bdd') instead of mocha.ui

It's right here and been there for a while.

A more stripped down version with links to a cdn for the resources might make this example much clearer in where it needs to get its resources from.

I don't want to promote a CDN usage when using npm or another package manager makes more sense. You can do that if you want though. That's really the point of an example. It's more of fill in the blank.

For those of us struggling to get something started being able to copy the example and have it just work would be helpful!

The biggest goal of mocha-phantomjs is that it complements your workflow when testing in a regular browser. If it's not working with an example it's because you don't have tests working at all. You start with your browser tests and tack this on. You can also work just directly from the command line from the start of this if you want.