Ai
1 Star 1 Fork 0

NotePlus/json4u

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
playwright.config.ts 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
Fangzheng Long 提交于 2024-11-12 20:37 +08:00 . test: add e2e tests for command search
import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";
import { fileURLToPath } from "node:url";
import path from "path";
const baseURL = "http://localhost:3000";
const CI = !!process.env.CI;
const __dirname = path.dirname(fileURLToPath(import.meta.url));
dotenv.config({ path: path.resolve(__dirname, ".env") });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
timeout: 60 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5 * 1000,
},
testDir: "./e2e/tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: CI,
retries: 1,
workers: CI ? 2 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
use: {
baseURL,
trace: "retain-on-failure",
},
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],
/* Run your local server before starting the tests */
webServer: {
command: "pnpm preview",
timeout: 10 * 60 * 1000,
url: baseURL,
reuseExistingServer: true,
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/noteplus/json4u.git
git@gitee.com:noteplus/json4u.git
noteplus
json4u
json4u
main

搜索帮助