Refactor Spec and QueueRunner [#62585700]

- QueueRunner now responsible for timing out async specs instead of
   Spec
 - Make sure only spec functions are timeoutable and not suites (due to
   the refactor)
This commit is contained in:
Greg Cobb and Sheel Choksi
2014-02-25 12:15:12 -08:00
parent 84160ff51d
commit 5aac3e3292
8 changed files with 143 additions and 174 deletions
+2 -2
View File
@@ -136,6 +136,7 @@ getJasmineRequireObj().Env = function(j$) {
var queueRunnerFactory = function(options) {
options.catchException = catchException;
options.clearStack = options.clearStack || clearStack;
options.timer = {setTimeout: realSetTimeout, clearTimeout: realClearTimeout};
new j$.QueueRunner(options).execute();
};
@@ -271,8 +272,7 @@ getJasmineRequireObj().Env = function(j$) {
description: description,
expectationResultFactory: expectationResultFactory,
queueRunnerFactory: queueRunnerFactory,
fn: fn,
timer: {setTimeout: realSetTimeout, clearTimeout: realClearTimeout}
fn: fn
});
runnableLookupTable[spec.id] = spec;