Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 3e91982

Browse files
committed
32129139: Use assertions more specific than toHaveBeenCalled()
1 parent a100838 commit 3e91982

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/router/routerTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe("router", () => {
133133
aRouter.resolveUrl("/user/");
134134

135135
// Assert that callback was executed
136-
expect(spy).toHaveBeenCalled();
136+
expect(spy).toHaveBeenCalledWith(jasmine.anything());
137137
});
138138

139139
it("resolveUrl triggers routeMatched event", (done) => {
@@ -183,7 +183,7 @@ describe("router", () => {
183183
aRouter.resolveUrl("/user/");
184184

185185
// Assert that callback was executed
186-
expect(spy).toHaveBeenCalled();
186+
expect(spy).toHaveBeenCalledWith(jasmine.anything());
187187
});
188188

189189
it("resolveUrl pass values to action", (done) => {
@@ -354,7 +354,7 @@ describe("router", () => {
354354
aRouter.resolveUrl("APathNotInDefaultRouterButInPipedRouter");
355355

356356
// Assert that second router matched the route
357-
expect(spy).toHaveBeenCalled();
357+
expect(spy).toHaveBeenCalledWith({});
358358
anotherRouter.stop();
359359
});
360360

@@ -373,7 +373,7 @@ describe("router", () => {
373373
aRouter.resolveUrl("/a/b/c");
374374

375375
// Assert that second router matched the route
376-
expect(spy).toHaveBeenCalled();
376+
expect(spy).toHaveBeenCalledTimes(1);
377377
anotherRouter.stop();
378378
});
379379

0 commit comments

Comments
 (0)