fix(test_lib): spy funcs should match null arguments

This commit is contained in:
Brian Ford
2015-05-07 17:18:42 -07:00
parent 05219a54cd
commit 84dc6ae76b
2 changed files with 6 additions and 1 deletions

View File

@ -91,6 +91,11 @@ export function main() {
expect(spyObj.spy("someFunc")).toHaveBeenCalledWith(3,4);
});
it("should match null arguments", () => {
spyObj.someFunc(null, "hello");
expect(spyObj.spy("someFunc")).toHaveBeenCalledWith(null,"hello");
});
it("should match using deep equality", () => {
spyObj.someComplexFunc([1]);
expect(spyObj.spy("someComplexFunc")).toHaveBeenCalledWith([1]);