Replace old "catch exceptions" logic with proper fail fast with error reporting

- Option is called stopOnSpecFailure

[#85966014]
- See #414
- See jasmine/jasmine-npm#16
This commit is contained in:
Gregg Van Hove
2018-01-30 11:36:56 -08:00
parent e908b67b19
commit e15f273f06
14 changed files with 191 additions and 133 deletions

View File

@@ -21,7 +21,8 @@ describe("ReportDispatcher", function() {
dispatcher.foo(123, 456, completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}, {fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}, {fn: jasmine.any(Function)}],
isReporter: true
}));
var fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;
@@ -38,7 +39,8 @@ describe("ReportDispatcher", function() {
dispatcher.bar('a', 'b', completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}, {fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}, {fn: jasmine.any(Function)}],
isReporter: true
}));
fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;
@@ -72,7 +74,8 @@ describe("ReportDispatcher", function() {
dispatcher.foo(123, 456, completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}],
isReporter: true
}));
var fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;
@@ -92,7 +95,8 @@ describe("ReportDispatcher", function() {
dispatcher.foo(123, 456, completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}],
isReporter: true
}));
var fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;
@@ -111,7 +115,8 @@ describe("ReportDispatcher", function() {
dispatcher.addReporter(reporter1);
dispatcher.foo(123, completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}],
isReporter: true
}));
var fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;
@@ -123,7 +128,8 @@ describe("ReportDispatcher", function() {
dispatcher.bar(456, completeCallback);
expect(queueRunnerFactory).toHaveBeenCalledWith(jasmine.objectContaining({
queueableFns: [{fn: jasmine.any(Function)}]
queueableFns: [{fn: jasmine.any(Function)}],
isReporter: true
}));
fns = queueRunnerFactory.calls.mostRecent().args[0].queueableFns;