Files
coder/site/e2e/playwright.config.ts
T
Kyle Carberry 3976994781 chore: Rename "start" to "server" (#1110)
Workspace commands will be aliased at the top-level, so
"start" would easily be confused with starting a workspace.

Server seems like a more appropriate name too.
2022-04-23 12:19:20 -05:00

28 lines
848 B
TypeScript

import { PlaywrightTestConfig } from "@playwright/test"
import * as path from "path"
const config: PlaywrightTestConfig = {
testDir: "tests",
globalSetup: require.resolve("./globalSetup"),
// Create junit report file for upload to DataDog
reporter: [["junit", { outputFile: "test-results/junit.xml" }]],
use: {
baseURL: "http://localhost:3000",
video: "retain-on-failure",
},
// `webServer` tells Playwright to launch a test server - more details here:
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
webServer: {
// Run the coder daemon directly.
command: `go run -tags embed ${path.join(__dirname, "../../cmd/coder/main.go")} server --dev --skip-tunnel`,
port: 3000,
timeout: 120 * 10000,
reuseExistingServer: false,
},
}
export default config