包含前端源码、预构建产物(dist/)、零依赖 Node.js 服务器(server.mjs)、 Cloudflare Worker 版本(worker/)、部署文档(DEPLOY.md)和交接文档。 技术总监可直接 clone 后运行 node server.mjs 启动,无需安装 React 或 build。 DEEPSEEK_API_KEY 通过环境变量注入,未纳入仓库。
19 lines
539 B
TypeScript
19 lines
539 B
TypeScript
import { defineConfig } from "@playwright/test";
|
|
|
|
const testPort = Number(process.env.MOBILE_RUNTIME_TEST_PORT ?? 4174);
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
testMatch: "**/*.spec.ts",
|
|
timeout: 20_000,
|
|
use: {
|
|
baseURL: `http://127.0.0.1:${testPort}`,
|
|
viewport: { width: 1100, height: 1100 },
|
|
},
|
|
webServer: {
|
|
command: `npm run dev -- --port ${testPort}`,
|
|
url: `http://127.0.0.1:${testPort}/tests/runtime-fixture.html`,
|
|
reuseExistingServer: process.env.MOBILE_RUNTIME_TEST_PORT == null,
|
|
},
|
|
});
|