Merge branch 'custom-object-formatters' into cof-merge-candidate

This commit is contained in:
Steve Gravrock
2020-02-11 11:44:38 -08:00
84 changed files with 3047 additions and 1017 deletions

View File

@@ -1,23 +1,25 @@
describe("toHaveBeenCalledBefore", function () {
it("throws an exception when the actual is not a spy", function () {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
fn = function () {
},
spy = new jasmineUnderTest.Spy('a spy');
describe("toHaveBeenCalledBefore", function() {
it("throws an exception when the actual is not a spy", function() {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore({
pp: jasmineUnderTest.makePrettyPrinter()
}),
fn = function() {},
spy = new jasmineUnderTest.Env().createSpy('a spy');
expect(function () {
matcher.compare(fn, spy)
matcher.compare(fn, spy);
}).toThrowError(Error, /Expected a spy, but got Function./);
});
it("throws an exception when the expected is not a spy", function () {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
spy = new jasmineUnderTest.Spy('a spy'),
fn = function () {
};
it("throws an exception when the expected is not a spy", function() {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore({
pp: jasmineUnderTest.makePrettyPrinter()
}),
spy = new jasmineUnderTest.Env().createSpy('a spy'),
fn = function() {};
expect(function () {
matcher.compare(spy, fn)
matcher.compare(spy, fn);
}).toThrowError(Error, /Expected a spy, but got Function./);
});