775e2ff0a9c8336e015e13fa7fd15693abf9d560
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.
======= 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
- Search past discussions: http://groups.google.com/group/jasmine-js
- Send an email to the list: jasmine-js@googlegroups.com
- View the project backlog at Pivotal Tracker: http://www.pivotaltracker.com/projects/10606
- Follow us on Twitter: @JasmineBDD
Maintainers
- Davis W. Frank, Pivotal Labs
- Rajan Agaskar, Pivotal Labs
- Sheel Choksi, Pivotal Labs
Maintainers Emeritus
- Christian Williams, Square
Copyright (c) 2008-2013 Pivotal Labs. This software is licensed under the MIT License.
Description
Languages
JavaScript
94.8%
TypeScript
2.4%
Vue
1.1%
CSS
0.9%
SCSS
0.5%
Other
0.2%

