Correctly route errors that occur while a QueueRunner is clearing stack
Besides surfacing the error in the hopefully-correct place, this also prevents the queue runners for sibling suites from interleaving, which in turn prevents all kinds of internal state corruption. Signed-off-by: Gregg Van Hove <gvanhove@pivotal.io>
This commit is contained in:
committed by
Gregg Van Hove
parent
2835ca3cce
commit
b1e97cfb09
@@ -238,6 +238,10 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
reporter.suiteStarted(suite.result);
|
||||
},
|
||||
nodeComplete: function(suite, result) {
|
||||
if (suite !== currentSuite()) {
|
||||
throw new Error('Tried to complete the wrong suite');
|
||||
}
|
||||
|
||||
if (!suite.markedPending) {
|
||||
clearResourcesForRunnable(suite.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user