Can't run the testing framework in CasperJS
问题 I am learning CasperJS and how to write unit tests but my test fails. I tried the example code from the website and it fails as well! I am confused about how to use the testing framework in CasperJS. This is my code: var casper = require('casper').create(); casper.test.begin('The title exists', 1, function suite(test) { casper.start('http://stackoverflow.com', function() { test.assertExists('title'); }).run(function() { test.done(); }); }); and execute it: casperjs test script.js Output: Test