Skip to content

Commit

Permalink
fix(stark-core): update typing in accordance with rxjs 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carlo-nomes committed Jan 30, 2019
1 parent c54424e commit 2aa37d4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ describe("Service: StarkSessionService", () => {
sessionService.registerTransitionHook();

expect((<Spy>mockRoutingService.addTransitionHook).calls.argsFor(0)[0]).toBe(StarkRoutingTransitionHook.ON_BEFORE);
const onBeforeHookCallback: Function = (<Spy>mockRoutingService.addTransitionHook).calls.argsFor(0)[2];
const onBeforeHookCallback: () => Promise<boolean> = (<Spy>mockRoutingService.addTransitionHook).calls.argsFor(0)[2];

sessionService.session$ = of(mockSession);

// trigger the onBefore hook callback
defer<boolean>(() => onBeforeHookCallback()).subscribe(
defer(() => onBeforeHookCallback()).subscribe(
(result: boolean) => {
expect(result).toBe(true);
},
Expand Down

0 comments on commit 2aa37d4

Please sign in to comment.