mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-10-31 22:33:45 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			609 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			609 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // 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),
 | |
| );
 |