fix: use vi.restoreAllMocks and toMatchSnapshot in dialog tests

- OverageMenuDialog.test.tsx: add afterEach with vi.restoreAllMocks(),
  remove RadioButtonSelect mock, use renderWithProviders + toMatchSnapshot
  for rendering tests and keyboard input for handler tests
- EmptyWalletDialog.test.tsx: same treatment as OverageMenuDialog
- useQuotaAndFallback.test.ts: vi.clearAllMocks() → vi.restoreAllMocks()
  in afterEach to prevent test pollution
This commit is contained in:
Gaurav Ghosh
2026-02-27 07:39:55 -08:00
parent 5cc9644a16
commit e75c7418d4
5 changed files with 196 additions and 178 deletions

View File

@@ -103,7 +103,7 @@ describe('useQuotaAndFallback', () => {
});
afterEach(() => {
vi.clearAllMocks();
vi.restoreAllMocks();
});
it('should register a fallback handler on initialization', () => {