diff --git a/packages/trpc/tests/routers/extension.spec.ts b/packages/trpc/tests/routers/extension.spec.ts index e928b5bb4..e03a5ab94 100644 --- a/packages/trpc/tests/routers/extension.spec.ts +++ b/packages/trpc/tests/routers/extension.spec.ts @@ -1,10 +1,21 @@ -import { describe, expect, it } from 'vitest'; +import { afterAll, beforeAll, describe, expect, it } from 'vitest'; import { getTrpcCaller } from '../test-helpers'; +import { anonymousSignIn, deleteFirebaseUser, FirebaseUser } from '../firebase'; describe('extension router test', () => { - const caller = getTrpcCaller(); + let user: FirebaseUser; + + beforeAll(async () => { + const userCredential = await anonymousSignIn(); + user = userCredential.user; + }); + + afterAll(async () => { + await deleteFirebaseUser(user); + }); it('should have expected response', async () => { + const caller = getTrpcCaller(); const output = await caller.extension.latest(); expect(output).toEqual( expect.objectContaining({