Closed Nanofus closed 7 years ago
Do the tests run in your browser?
Yes, they work fine in the browser.
Change the windows backslash (\
) to unix slash (/
) in the test runner file path.
For example C:/dev/test/runner.html
Closing without more information. mocha.ui('bdd')
is used everywhere in the tests.
@Nanofus @nathanboktae The error seems to be fixed while using mocha-phantomjs -R dot "./tests/index.html"
btw how does it work in the browser? C'z I'm getting
ReferenceError: callPhantom is not defined
at Context.
describe('Screenshot', function() {
it('takes screenshot', function() {
var date = new Date()
var filename = "/screenshot"
console.log("Taking screenshot " + filename)
callPhantom({'screenshot': filename})
});
});
Hi! I'm trying to run some tests using the following HTML:
I double-checked the file paths, they are all correct. If I
console.log(mocha.ui)
it returns the correct function. However, when I runmocha-phantomjs
, I get the following error:I'm on Windows 10,
phantomjs
version is 2.1.1,mocha
version is 2.4.5 andmocha-phantomjs
version is 4.0.2.Thanks in advance!