UNPKG

chicago

Version:

A front-end JavaScript library for user-interface developers.

19 lines (16 loc) 657 B
var testfile = require('fs').workingDirectory + '/test/mocha/support.html'; casper.start(testfile); casper.waitForSelector('#mocha-stats', function() { casper.evaluate(function() { var tests = __utils__.findAll('.test'); var total = __utils__.findAll('.test').length; var passing = __utils__.findAll('.test.pass').length; var failing = __utils__.findAll('.test.fail').length; __utils__.echo("Total: " + total); __utils__.echo("Passing: " + passing); __utils__.echo("Failing: " + failing); // get tests from mocha, iterate over them to ensure their passing. if not, warn in the command line __utils__.echo(tests); }); }); casper.run();