chore(tooling): 对齐协作规范与 Playwright 运行配置
统一设备配置和浏览器启动入口,加入窗口焦点守卫,并按运行隔离报告和追踪文件。
This commit is contained in:
@@ -122,10 +122,15 @@ test('checked-in defaults preserve same-origin behavior and disable analytics',
|
||||
});
|
||||
|
||||
test('development server transforms the HTML and runtime configuration modules', async () => {
|
||||
// Inline `watch: null` is dropped when merged with the config file, so pass the
|
||||
// loaded config directly; otherwise chokidar keeps the test process alive.
|
||||
const userConfig = await config(root, 'development');
|
||||
const server = await createServer({
|
||||
...userConfig,
|
||||
configFile: false,
|
||||
root,
|
||||
cacheDir: path.join(root, '.cache/vite-environment-test'),
|
||||
server: { middlewareMode: true },
|
||||
server: { ...userConfig.server, middlewareMode: true, watch: null },
|
||||
optimizeDeps: { noDiscovery: true, include: [] },
|
||||
});
|
||||
try {
|
||||
@@ -166,6 +171,7 @@ test('Vite proxies API requests on Node 22 without DEP0060', async () => {
|
||||
server: {
|
||||
host: '127.0.0.1',
|
||||
port: 0,
|
||||
watch: null,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: `http://127.0.0.1:${upstream.address().port}`,
|
||||
|
||||
Reference in New Issue
Block a user