Skip to content

Commit a5f7780

Browse files
authored
fix(playwright): move playwright install from prepare to test:e2e (#1072)
1 parent e94734e commit a5f7780

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'sv': patch
3+
---
4+
5+
fix(playwright): move `playwright install` from `prepare` to `test:e2e` script

packages/sv/src/addons/playwright.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export default defineAddon({
1414
sv.file(
1515
file.package,
1616
transforms.json(({ data, json }) => {
17-
json.packageScriptsUpsert(data, 'prepare', 'playwright install', { mode: 'prepend' });
1817
json.packageScriptsUpsert(data, 'test:e2e', 'playwright test');
18+
json.packageScriptsUpsert(data, 'test:e2e', 'playwright install', { mode: 'prepend' });
1919
json.packageScriptsUpsert(data, 'test', 'npm run test:e2e');
2020
})
2121
);

packages/sv/src/cli/tests/snapshots/create-with-all-addons/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"dev": "vite dev",
88
"build": "vite build",
99
"preview": "vite preview",
10-
"prepare": "playwright install && svelte-kit sync || echo ''",
10+
"prepare": "svelte-kit sync || echo ''",
1111
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1212
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1313
"lint": "prettier --check . && eslint .",
1414
"format": "prettier --write .",
1515
"test:unit": "vitest",
1616
"test": "npm run test:unit -- --run && npm run test:e2e",
17-
"test:e2e": "playwright test",
17+
"test:e2e": "playwright install && playwright test",
1818
"db:push": "drizzle-kit push",
1919
"db:generate": "drizzle-kit generate",
2020
"db:migrate": "drizzle-kit migrate",

0 commit comments

Comments
 (0)