Improve errors with the domaine and how to use the API

This commit is contained in:
dhoko
2016-01-20 15:49:47 +01:00
parent b6798cdb06
commit 14067d0785
16 changed files with 131 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
describe("toHaveBeenCalledWith", function() {
it("passes when the actual was called with matching parameters", function() {
var util = {
contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
@@ -61,6 +62,6 @@ describe("toHaveBeenCalledWith", function() {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledWith(),
fn = function() {};
expect(function() { matcher.compare(fn) }).toThrow(new Error("Expected a spy, but got Function."));
expect(function() { matcher.compare(fn) }).toThrowError(/Expected a spy, but got Function./);
});
});