Fixed spec failure on Chrome

This commit is contained in:
Steve Gravrock
2017-12-01 08:28:55 -08:00
parent 21655a82c9
commit 98ead94c51
2 changed files with 6 additions and 5 deletions

View File

@@ -96,8 +96,10 @@ describe("jasmineUnderTest.util", function() {
describe("jasmineFile", function() {
it("returns the file containing jasmine.util", function() {
expect(jasmineUnderTest.util.jasmineFile()).toMatch(/util.js$/);
expect(jasmine.util.jasmineFile()).toMatch(/jasmine.js$/);
// Chrome sometimes reports foo.js as foo.js/, so tolerate
// a trailing slash if present.
expect(jasmineUnderTest.util.jasmineFile()).toMatch(/util.js\/?$/);
expect(jasmine.util.jasmineFile()).toMatch(/jasmine.js\/?$/);
});
});
});

View File

@@ -2201,13 +2201,12 @@ describe("Env integration", function() {
var env = new jasmineUnderTest.Env();
var reporter = jasmine.createSpyObj('reporter', ['jasmineDone', 'suiteDone', 'specDone']);
reporter.jasmineDone.and.callFake(function(e) {
debugger;
expect(e.overallStatus).toEqual('failed');
done();
});
env.addReporter(reporter);
env.it('passes', function() {});
global.onerror('Uncaught Error: ENOCHEESE');