We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b0cb33 commit daeddefCopy full SHA for daeddef
apps/site/playwright.config.ts
@@ -1,5 +1,7 @@
1
import { defineConfig, devices, type Config } from '@playwright/test';
2
3
+import json from './package.json' with { type: 'json' };
4
+
5
const isCI = !!process.env.CI;
6
7
// https://playwright.dev/docs/test-configuration
@@ -32,6 +34,10 @@ export default defineConfig({
32
34
});
33
35
36
function getWebServerConfig(): Pick<Config, 'webServer'> {
37
+ if (!json.scripts['cloudflare:preview']) {
38
+ throw new Error('cloudflare:preview script not defined');
39
+ }
40
41
if (process.env.PLAYWRIGHT_RUN_CLOUDFLARE_PREVIEW) {
42
return {
43
webServer: {
0 commit comments