Add cli test for step throwing exception. Unfortuately there's another bug now r…
…eporting extra test failures
Showing
2 changed files
with
28 additions
and
0 deletions
... | @@ -269,6 +269,24 @@ class TestCommandOutputTest(CasperExecTestBase): | ... | @@ -269,6 +269,24 @@ class TestCommandOutputTest(CasperExecTestBase): |
269 | ], failing=True) | 269 | ], failing=True) |
270 | 270 | ||
271 | @timeout(20) | 271 | @timeout(20) |
272 | def test_step_throwing_test(self): | ||
273 | # using begin() | ||
274 | script_path = os.path.join(TEST_ROOT, 'tester', 'step_throws.js') | ||
275 | self.assertCommandOutputContains('test ' + script_path, [ | ||
276 | script_path, | ||
277 | '# step throws', | ||
278 | 'FAIL Error: oops!', | ||
279 | '# type: error', | ||
280 | '# file: %s:5' % script_path, | ||
281 | '# error: oops!', | ||
282 | 'FAIL 2 tests executed', # this is another bug | ||
283 | '0 passed', | ||
284 | '2 failed', | ||
285 | '0 dubious', | ||
286 | '0 skipped', | ||
287 | ], failing=True) | ||
288 | |||
289 | @timeout(20) | ||
272 | def test_dubious_test(self): | 290 | def test_dubious_test(self): |
273 | script_path = os.path.join(TEST_ROOT, 'tester', 'dubious.js') | 291 | script_path = os.path.join(TEST_ROOT, 'tester', 'dubious.js') |
274 | self.assertCommandOutputContains('test ' + script_path, [ | 292 | self.assertCommandOutputContains('test ' + script_path, [ | ... | ... |
-
Please register or sign in to post a comment