Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsingh-007 committed Dec 25, 2024
1 parent 4ed7a91 commit da8b89f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/trpc/tests/routers/extension.spec.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down

0 comments on commit da8b89f

Please sign in to comment.