Something went wrong. Try again.
Monorepo for the nibling.run platform
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import { defineConfig } from "@playwright/test";
// Parallel runs pass their own PORT; the sandbox server takes the next one.const port = Number(process.env.PORT ?? 8941);const sandboxPort = port + 1;
export default defineConfig({ testDir: "tests", testMatch: "**/*.spec.ts", use: { baseURL: `http://127.0.0.1:${port}` }, // Reusing a server on these ports could test another checkout's playground. webServer: [ { command: `vite playground --port ${port} --strictPort`, url: `http://127.0.0.1:${port}/`, reuseExistingServer: false, // The default npm gateway is a name no test reaches unless it routes it, never the hosted one. env: { VITE_NIBLING_SANDBOX: `http://{id}.localhost:${sandboxPort}`, VITE_NIBLING_NPM_GATEWAY: "npm-gateway.test" }, }, { command: `vite --port ${sandboxPort} --strictPort`, cwd: "../sandbox", url: `http://127.0.0.1:${sandboxPort}/`, reuseExistingServer: false, env: { NIB_APP_ORIGINS: `http://127.0.0.1:${port}` }, }, ],});