Commit 5d9f0ea0 5d9f0ea02d8641d059b484ec7a216fa6fbbaffd5 by Nathan Black

Add cli test for step throwing exception. Unfortuately there's another bug now r…

…eporting extra test failures
1 parent 729acab7
......@@ -269,6 +269,24 @@ class TestCommandOutputTest(CasperExecTestBase):
], failing=True)
@timeout(20)
def test_step_throwing_test(self):
# using begin()
script_path = os.path.join(TEST_ROOT, 'tester', 'step_throws.js')
self.assertCommandOutputContains('test ' + script_path, [
script_path,
'# step throws',
'FAIL Error: oops!',
'# type: error',
'# file: %s:5' % script_path,
'# error: oops!',
'FAIL 2 tests executed', # this is another bug
'0 passed',
'2 failed',
'0 dubious',
'0 skipped',
], failing=True)
@timeout(20)
def test_dubious_test(self):
script_path = os.path.join(TEST_ROOT, 'tester', 'dubious.js')
self.assertCommandOutputContains('test ' + script_path, [
......
/*jshint strict:false*/
casper.test.begin('step throws', 1, function(test) {
casper.start();
casper.then(function() {
throw new Error('oops!')
});
casper.run(function() {
test.done();
})
});