Skip to content

Commit fc8d838

Browse files
committed
test(auth): unnest the afterAll that never restored console.info
`console.info` is mocked in `beforeAll` to silence the Auth Emulator warning. The restore lived in an `afterAll` nested inside another `afterAll`, so the inner hook was only registered while teardown was already running, and never ran. The mock leaked past the suite. Pre-existing and unrelated to the AuthCheck removal, folded in because it is two lines in a file this branch already edits. The `@ts-expect-error` above it is still required, which the test typecheck confirms.
1 parent 5430ef2 commit fc8d838

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎test/auth.test.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@ describe('Authentication', () => {
7474
});
7575

7676
afterAll(() => {
77-
afterAll(() => {
78-
// @ts-expect-error console.info is mocked in beforeAll
79-
console.info.mockRestore();
80-
});
77+
// @ts-expect-error console.info is mocked in beforeAll
78+
console.info.mockRestore();
8179
});
8280

8381
test('double check - emulator is running', async () => {

0 commit comments

Comments
 (0)