Closed mrdevinmob closed 12 years ago
Hmmm, that should work, I bet it is your version of Mocha.js? I have only developed and tested this with version 1.4.2. Can you try that one and let me know?
I just tried 1.4.2 and I sitll get this error
ReferenceError: Can't find variable: process
mocha-phantomjs/core_extensions.js:21
mocha-phantomjs/core_extensions.js:82
ReferenceError: Can't find variable: process
phantomjs://webpage.evaluate():2
phantomjs://webpage.evaluate():8
phantomjs://webpage.evaluate():8
ReferenceError: Can't find variable: process
phantomjs://webpage.evaluate():3
phantomjs://webpage.evaluate():17
phantomjs://webpage.evaluate():17
Failed to start mocha.
Hmmm, so I was looking at my npm installed mocha and it appears that the mocha/mocha.js is different from mocha/lib/mocha.js. I wonder why?
odd, I see the smae thing but have no explanation, yet.
it is required in index.js
I am runing
phantomjs mocha-phantomjs.coffee http://localhost:8080/test.html spec
from root and node_modulles/
is also in root with the mocha-phantomjs
files
BUT
my test are in public/js/test/
could this be causing a problem ?
That should be fine. I think the only issue is requiring the mocha.js which is build for the browser. It resides right next to mocha.css. Perhaps the mocha.js you put in your vendor folder could be swapped out?
Great thanks!
Worked like a charm.
NP, thanks for taking the time too. I need to find out the differences between the two mocha.js files and make a note our documentation. I just made a issue for myself to followup on that in #2
hi, I really like the idea of your lib but can't get it to work right.
my Html Looks like this:(/public/test.html)
I have the
mocha-phantomjs.coffee
andmocha-phantomjs.coffee
in the root dirwhen i run
phantomjs mocha-phantomjs.coffee http://localhost:8080/test.html spec
i get on of the following responses.or
Am I missing something, did i forget a ste?
Oh and I did do
npm install
before trying to run the scriptmy npm version is _1.1.59_ my node version _v0.8.8_ my phantom js version _1.6.1_