chore: migrate to KT financial system

This commit is contained in:
woshiqp465
2025-11-04 16:06:44 +08:00
parent 2c0505b73d
commit f4cd0a5f22
289 changed files with 7362 additions and 41458 deletions

28
vitest.setup.ts Normal file
View File

@@ -0,0 +1,28 @@
if (typeof window !== 'undefined' && window.happyDOM) {
window.happyDOM.setURL('http://172.16.74.149:5666/');
window.happyDOM.settings.fetch.interceptor = {
async beforeAsyncRequest({ request }) {
const { Response } = window;
const url = request.url;
if (!Response) return undefined;
if (url.startsWith('https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js')) {
return new Response('window.__mockJQueryLoaded = true;', {
status: 200,
headers: { 'content-type': 'application/javascript' },
});
}
if (
url.startsWith('http://localhost:3000') ||
url.startsWith('http://127.0.0.1:3000') ||
url.startsWith('http://[::1]:3000') ||
url.startsWith('http://172.16.74.149:5666')
) {
return new Response('', {
status: 200,
headers: { 'content-type': 'application/javascript' },
});
}
return undefined;
},
};
}