Skip to content

Commit

Permalink
Remove calls to tick function
Browse files Browse the repository at this point in the history
  • Loading branch information
ssylver93 committed Dec 9, 2024
1 parent 731e971 commit 2c7041f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ describe('PrevAuthGuard', () => {

guard.canActivate(route, state);

tick(); // Simulate passage of time for observable
flush(); // Flush any remaining async operations

expect(guard.redirectToErrorPage).toHaveBeenCalled();
Expand All @@ -225,8 +224,7 @@ describe('PrevAuthGuard', () => {
spyOn(guard, 'redirectToErrorPage');

guard.canActivate(route, state).subscribe();

tick(); // Advance async operations

flush(); // Flush any remaining async operations

expect(guard.redirectToErrorPage).toHaveBeenCalled();
Expand All @@ -247,7 +245,6 @@ describe('PrevAuthGuard', () => {

guard.canActivate(route, state).subscribe();

tick();
flush(); // Flush any remaining async operations

expect(guard.redirectToErrorPage).toHaveBeenCalled();
Expand Down

0 comments on commit 2c7041f

Please sign in to comment.