Fixed global error handler stack corruption in Jasmine's own tests

This commit is contained in:
Steve Gravrock
2020-09-02 09:31:35 -07:00
parent 5a715aecee
commit 00feef8632
14 changed files with 833 additions and 985 deletions

View File

@@ -28,8 +28,8 @@ describe('Custom Async Matchers (Integration)', function() {
expect(result.status).toEqual('passed');
};
env.addReporter({ specDone: specExpectations, jasmineDone: done });
env.execute();
env.addReporter({ specDone: specExpectations });
env.execute(null, done);
});
it('uses the negative compare function for a negative comparison, if provided', function(done) {
@@ -52,8 +52,8 @@ describe('Custom Async Matchers (Integration)', function() {
expect(result.status).toEqual('passed');
};
env.addReporter({ specDone: specExpectations, jasmineDone: done });
env.execute();
env.addReporter({ specDone: specExpectations });
env.execute(null, done);
});
it('generates messages with the same rules as built in matchers absent a custom message', function(done) {
@@ -77,8 +77,8 @@ describe('Custom Async Matchers (Integration)', function() {
expect(result.failedExpectations[0].message).toEqual("Expected 'a' to be real.");
};
env.addReporter({ specDone: specExpectations, jasmineDone: done });
env.execute();
env.addReporter({ specDone: specExpectations });
env.execute(null, done);
});
// TODO: remove this in the next major release.
@@ -113,8 +113,8 @@ describe('Custom Async Matchers (Integration)', function() {
);
};
env.addReporter({ specDone: specExpectations, jasmineDone: done });
env.execute();
env.addReporter({ specDone: specExpectations });
env.execute(null, done);
});
it("provides custom equality testers to the matcher factory via matchersUtil", function(done) {
@@ -145,7 +145,7 @@ describe('Custom Async Matchers (Integration)', function() {
expect(result.failedExpectations).toEqual([]);
};
env.addReporter({ specDone: specExpectations, jasmineDone: done });
env.execute();
env.addReporter({ specDone: specExpectations });
env.execute(null, done);
});
});