Refer to MatchersUtil instances as matchersUtil, not util
This commit is contained in:
@@ -23,11 +23,11 @@ describe("toThrow", function() {
|
||||
});
|
||||
|
||||
it("passes if it throws but there is no expected", function() {
|
||||
var util = {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(true),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
},
|
||||
matcher = jasmineUnderTest.matchers.toThrow(util),
|
||||
matcher = jasmineUnderTest.matchers.toThrow(matchersUtil),
|
||||
fn = function() {
|
||||
throw 5;
|
||||
},
|
||||
@@ -54,11 +54,11 @@ describe("toThrow", function() {
|
||||
});
|
||||
|
||||
it("passes if what is thrown is equivalent to what is expected", function() {
|
||||
var util = {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(true),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
},
|
||||
matcher = jasmineUnderTest.matchers.toThrow(util),
|
||||
matcher = jasmineUnderTest.matchers.toThrow(matchersUtil),
|
||||
fn = function() {
|
||||
throw 5;
|
||||
},
|
||||
@@ -71,11 +71,11 @@ describe("toThrow", function() {
|
||||
});
|
||||
|
||||
it("fails if what is thrown is not equivalent to what is expected", function() {
|
||||
var util = {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(false),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
},
|
||||
matcher = jasmineUnderTest.matchers.toThrow(util),
|
||||
matcher = jasmineUnderTest.matchers.toThrow(matchersUtil),
|
||||
fn = function() {
|
||||
throw 5;
|
||||
},
|
||||
@@ -88,11 +88,11 @@ describe("toThrow", function() {
|
||||
});
|
||||
|
||||
it("fails if what is thrown is not equivalent to undefined", function() {
|
||||
var util = {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(false),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
},
|
||||
matcher = jasmineUnderTest.matchers.toThrow(util),
|
||||
matcher = jasmineUnderTest.matchers.toThrow(matchersUtil),
|
||||
fn = function() {
|
||||
throw 5;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user