Skip to content

Commit 84dc6ae

Browse files
committed
fix(test_lib): spy funcs should match null arguments
1 parent 05219a5 commit 84dc6ae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

modules/angular2/src/test_lib/test_lib.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Expect expect(actual, [matcher]) {
7272
return expect;
7373
}
7474

75-
const _u = null;
75+
const _u = const Object();
7676

7777
class Expect extends gns.Expect {
7878
Expect(actual) : super(actual);

modules/angular2/test/test_lib/test_lib_spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export function main() {
9191
expect(spyObj.spy("someFunc")).toHaveBeenCalledWith(3,4);
9292
});
9393

94+
it("should match null arguments", () => {
95+
spyObj.someFunc(null, "hello");
96+
expect(spyObj.spy("someFunc")).toHaveBeenCalledWith(null,"hello");
97+
});
98+
9499
it("should match using deep equality", () => {
95100
spyObj.someComplexFunc([1]);
96101
expect(spyObj.spy("someComplexFunc")).toHaveBeenCalledWith([1]);

0 commit comments

Comments
 (0)