Make api mock preserve other Convex routes in rename test
This commit is contained in:
parent
35de633b6f
commit
cb0ee989c0
1 changed files with 10 additions and 3 deletions
|
|
@ -13,9 +13,16 @@ vi.mock("convex/browser", () => ({
|
|||
ConvexHttpClient: vi.fn(() => ({ mutation: mutationMock })),
|
||||
}))
|
||||
|
||||
vi.mock("@/convex/_generated/api", () => ({
|
||||
api: { users: { ensureUser: "users:ensureUser" } },
|
||||
}))
|
||||
vi.mock("@/convex/_generated/api", async () => {
|
||||
const actual = await vi.importActual<typeof import("@/convex/_generated/api")>("@/convex/_generated/api")
|
||||
return {
|
||||
...actual,
|
||||
api: {
|
||||
...actual.api,
|
||||
users: { ensureUser: "users:ensureUser" },
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
describe("POST /api/admin/devices/rename", () => {
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue