nathanboktae / mocha-phantomjs-core

Easiest way to run client-side Mocha tests in PhantomJS or SlimerJS :ghost:
MIT License
34 stars 11 forks source link

Incorrect Documentation? #30

Closed jonny-improbable closed 7 years ago

jonny-improbable commented 7 years ago

Sorry for the question, but the documentation in the README implies one can simply:

$ npm install mocha-phantomjs-core
$ phantomjs mocha-phantomjs-core.js my-tests.html

However if I try to do this I get the following error from phantom:

Can't open 'mocha-phantomjs-core.js'

I can resolve this by giving phantomjs the relative path to the mocha-phantomjs-core.js file, ie:

phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js my-tests.html

Should the README be updated to reflect this or am I missing a trick?

nathanboktae commented 7 years ago

I added some examples. usually in those usage examples where the binary refers to itself, specifying the location to the binary (or in this case the script) is up to the user. but I'm sure 99.9% of usage is via npm so it's good to add.