Skip to content

Commit

Permalink
Flush any remaining async operations in token validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ssylver93 committed Dec 9, 2024
1 parent 2b37d68 commit 731e971
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe('PrevAuthGuard', () => {
guard.canActivate(route, state).subscribe();

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

expect(guard.redirectToErrorPage).toHaveBeenCalled();
}));
Expand All @@ -247,6 +248,7 @@ describe('PrevAuthGuard', () => {
guard.canActivate(route, state).subscribe();

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

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

0 comments on commit 731e971

Please sign in to comment.