François Daoust 775e2ff0a9 Clears timeout timer even when async spec throws an exception
When an async spec throws a (sync) exception for some reason, the
exception was correctly caught and reported by Jasmine but the timeout
timer continued to run in the background.

For instance, running the (rather stupid) example below would report
the exception immediately but would also make the process loop for 5s
(and report the exception depending on the reported being used).

describe('exception', function () {
  it('is caught but timer continues to run', function (done) {
    throw new Error('Oh no!');
  });
});

This happened because the timout timer is set in Spec while the
"try... catch" block is in the queue runner. The "callDone" function
of "timeoutable" that resets the timer was thus not called.

The commit simply introduces a "try... catch" block within the
`timeoutable` function to ensure that "callDone" gets called even
when an exception is thrown.
2013-11-07 14:51:46 +01:00
2013-10-04 10:55:01 -07:00
2013-10-30 23:14:57 -04:00
2012-12-03 09:38:54 -08:00
2013-10-04 13:32:56 -07:00
2013-10-25 10:57:43 -07:00
2013-08-06 08:04:37 -07:00
2011-03-09 08:16:47 -08:00
2013-10-30 10:31:15 -04:00

Jasmine Build Status Code Climate

======= A JavaScript Testing Framework

Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.

Documentation & guides live here: http://pivotal.github.com/jasmine/

Contributing

Please read the contributors' guide

Support

Maintainers

Maintainers Emeritus

Copyright (c) 2008-2013 Pivotal Labs. This software is licensed under the MIT License.

Description
No description provided
Readme 68 GiB
Languages
JavaScript 94.8%
TypeScript 2.4%
Vue 1.1%
CSS 0.9%
SCSS 0.5%
Other 0.2%