Built distribution

- Fixes #1327
- Fixes jasmine/gulp-jasmine-browser#48
This commit is contained in:
Steve Gravrock
2017-05-16 14:36:35 -07:00
parent b9adc76dc7
commit 4f49288f31

View File

@@ -854,6 +854,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);
}
@@ -1601,11 +1605,22 @@ getJasmineRequireObj().clearStack = function(j$) {
head = {},
tail = head;
var taskRunning = false;
channel.port1.onmessage = function() {
head = head.next;
var task = head.task;
delete head.task;
task();
if (taskRunning) {
global.setTimeout(task, 0);
} else {
try {
taskRunning = true;
task();
} finally {
taskRunning = false;
}
}
};
return function clearStack(fn) {
@@ -3828,6 +3843,11 @@ getJasmineRequireObj().QueueRunner = function(j$) {
}
QueueRunner.prototype.execute = function() {
var self = this;
this.handleFinalError = function(error) {
self.onException(error);
};
this.globalErrors.pushListener(this.handleFinalError);
this.run(this.queueableFns, 0);
};
@@ -3847,7 +3867,10 @@ getJasmineRequireObj().QueueRunner = function(j$) {
}
}
this.clearStack(this.onComplete);
this.clearStack(function() {
self.globalErrors.popListener(self.handleFinalError);
self.onComplete();
});
function attemptSync(queueableFn) {
try {