fix tests

This commit is contained in:
bkellam 2025-09-19 17:27:36 -07:00
parent 344ff5f100
commit c7e2f5ae06
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,6 @@
import { SINGLE_TENANT_ORG_DOMAIN, SINGLE_TENANT_ORG_ID, SINGLE_TENANT_ORG_NAME } from '@/lib/constants';
import { ApiKey, Org, PrismaClient, User } from '@prisma/client';
import { beforeEach } from 'vitest';
import { beforeEach, vi } from 'vitest';
import { mockDeep, mockReset } from 'vitest-mock-extended';
beforeEach(() => {
@ -43,6 +43,8 @@ export const MOCK_USER: User = {
updatedAt: new Date(),
hashedPassword: null,
emailVerified: null,
image: null
image: null,
permissionSyncedAt: null
}
export const userScopedPrismaClientExtension = vi.fn();

View file

@ -188,6 +188,7 @@ describe('getAuthContext', () => {
},
org: MOCK_ORG,
role: OrgRole.MEMBER,
prisma: undefined,
});
});
@ -217,6 +218,7 @@ describe('getAuthContext', () => {
},
org: MOCK_ORG,
role: OrgRole.OWNER,
prisma: undefined,
});
});
@ -241,6 +243,7 @@ describe('getAuthContext', () => {
},
org: MOCK_ORG,
role: OrgRole.GUEST,
prisma: undefined,
});
});
@ -256,6 +259,7 @@ describe('getAuthContext', () => {
user: undefined,
org: MOCK_ORG,
role: OrgRole.GUEST,
prisma: undefined,
});
});
});