SIGN IN SIGN UP
ChatGPTNextWeb / NextChat UNCLAIMED

✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

0 0 0 TypeScript
2024-08-06 18:03:27 +08:00
// Learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";
2025-03-07 14:49:17 +08:00
import { jest } from "@jest/globals";
2024-10-28 16:47:05 +08:00
global.fetch = jest.fn(() =>
Promise.resolve({
ok: true,
status: 200,
2025-03-07 14:49:17 +08:00
json: () => Promise.resolve([]),
2024-10-28 16:47:05 +08:00
headers: new Headers(),
redirected: false,
statusText: "OK",
type: "basic",
url: "",
body: null,
bodyUsed: false,
arrayBuffer: () => Promise.resolve(new ArrayBuffer(0)),
blob: () => Promise.resolve(new Blob()),
formData: () => Promise.resolve(new FormData()),
text: () => Promise.resolve(""),
2025-03-07 14:49:17 +08:00
} as Response),
2024-10-28 16:47:05 +08:00
);