/
githubmirror
/
ChatGPT-Next-Web
Обзор
Документация
Войти
/
githubmirror
/
ChatGPT-Next-Web
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
jest.setup.ts
22 строки
609 B
Vangie Du
test: fix unit test failures
07 мар 2025, 09:49
07 мар 2025, 09:49
0d41a17
Код
Авторство
О чём код?
// Learn more: https://github.com/testing-library/jest-dom import "@testing-library/jest-dom"; import { jest } from "@jest/globals"; global.fetch = jest.fn(() => Promise.resolve({ ok: true, status: 200, json: () => Promise.resolve([]), 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(""), } as Response), );