Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rouk1 committed Jul 17, 2024
1 parent 85c629d commit 873e3e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/tests/test.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { type ComponentPublicInstance, defineComponent, h, Suspense } from "vue"
export const mockedFetch = vi.fn();
global.fetch = mockedFetch;

export function createFetchResponse(data: object) {
return { json: () => new Promise((resolve) => resolve(data)) };
export function createFetchResponse(data: object, status = 200) {
return { json: () => new Promise((resolve) => resolve(data)), status };
}

export async function mountSuspense(
Expand Down

0 comments on commit 873e3e1

Please sign in to comment.