Commit current project

This commit is contained in:
2026-03-29 22:44:13 +02:00
parent b3bccb2ae3
commit 7f9469c07d
77 changed files with 20495 additions and 0 deletions

19
test/setup.ts Normal file
View File

@@ -0,0 +1,19 @@
import { expect, type Assertion, type AsymmetricMatchersContaining } from 'vitest';
import * as matchers from '@testing-library/jest-dom/matchers';
import { type TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
import '@testing-library/jest-dom';
declare module 'vitest' {
interface Assertion<T = any> extends TestingLibraryMatchers<typeof expect.stringContaining, T> { }
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<any, any> { }
}
expect.extend(matchers);
// In Node 20 / Vitest environment, Response and Headers are already
// defined globally. Polyfilling them from node-fetch is no longer
// required and avoids deprecation warnings.
if (typeof globalThis.Response === 'undefined') {
console.warn('Polyfilling Response for test environment');
}