diff --git a/src/__tests__/integration/data-backup.test.ts b/src/__tests__/integration/data-backup.test.ts index 7653b4d3..96d553a5 100644 --- a/src/__tests__/integration/data-backup.test.ts +++ b/src/__tests__/integration/data-backup.test.ts @@ -1344,7 +1344,7 @@ describe('备份导入体积与格式防护', () => { const importRaw = (body: Uint8Array, contentType = 'application/json') => IMPORT(new Request('http://localhost/api/import', { method: 'POST', - body, + body: body as BodyInit, headers: { 'Content-Type': contentType }, })); diff --git a/src/__tests__/unit/docker/docker-config.test.ts b/src/__tests__/unit/docker/docker-config.test.ts index f9677dcf..e3dc003a 100644 --- a/src/__tests__/unit/docker/docker-config.test.ts +++ b/src/__tests__/unit/docker/docker-config.test.ts @@ -105,7 +105,7 @@ describe('docker-entrypoint 版本检测', () => { return line; }; - function currentVersion(env: Record): string { + function currentVersion(env: Record): string { const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'wn-version-')); tempDirs.push(dir); fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify({ version: '0.0.0' })); diff --git a/src/__tests__/unit/https-server.test.ts b/src/__tests__/unit/https-server.test.ts index 0a42e277..916875c6 100644 --- a/src/__tests__/unit/https-server.test.ts +++ b/src/__tests__/unit/https-server.test.ts @@ -70,7 +70,7 @@ function listenHttp(handler: http.RequestListener): Promise { return promise; } -function startProxy(env: NodeJS.ProcessEnv): Promise { +function startProxy(env: Record): Promise { const { promise, resolve, reject } = Promise.withResolvers(); const child = spawn(process.execPath, [script], { env: { ...process.env, CERT_DIR: certDir, ...env },