I am using Windows. I am trying to use the CasperJS test framework.
I am using phantomjs version 1.9.0. I am using casperjs version 1.0.2.
When I run
casperjs test cow-test.js
The following is returned.
Test file: cow-test.js
FAIL TypeError: 'undefined' is not a function (evaluating 'casper.test.begin')
# type: uncaughtError
# error: "TypeError: 'undefined' is not a function (evaluating 'casper.test.begin')"
TypeError: 'undefined' is not a function (evaluating 'casper.test.begin')
C:/cow-test.js:16
FAIL 1 tests executed in 0.116s, 0 passed, 1 failed.
Details for the 1 failed test:
In cow-test.js:0
uncaughtError: TypeError: 'undefined' is not a function
(evaluating 'casper.test.begin')
var cow = {};
test.assert(cow);
test.done();
})')
If I do only
console.log(casper.test);
The following is returned
[object Object]
If I do only
console.log(casper.test.begin);
The following is returned.
undefined
What do I do? Do I supposed to run "casperjs test cow-test.js" from a specific directory?
Or, something else?
Thanks, Andre [email protected]
You using stable version of casperjs while docs and code on site are for devel version 1.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With