Commit 41fdadc
authored
test: fix flaky logout test race condition (#995)
## Summary
Fixes intermittent test failure in `should provide a logout method` by
waiting for authentication to complete before calling logout.
## Changes
Added `isAuthenticated` check to the existing `waitFor` block to ensure
the provider has finished initializing before testing logout behavior.
```typescript
await waitFor(() => {
expect(result.current.logout).toBeInstanceOf(Function);
expect(result.current.isAuthenticated).toBe(true);
});
```1 parent c25cb38 commit 41fdadc
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
| |||
0 commit comments