Skip to content

Commit ecff003

Browse files
authored
perf: use pnpm exec playwright instead of npx playwright (#22)
1 parent 8c1ac79 commit ecff003

15 files changed

Lines changed: 15 additions & 15 deletions

File tree

tests/rsbuild/modernjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function test(options: RunOptions) {
4444
},
4545
beforeTest: async () => {
4646
cd('tests/e2e/builder');
47-
await $`pnpm playwright install chromium`;
47+
await $`pnpm exec playwright install chromium`;
4848
cd('../../../');
4949
},
5050
test: ['test:framework', 'test:builder'],

tests/rsbuild/rslib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function test(options: RunOptions) {
88
branch: process.env.RSLIB ?? 'main',
99
beforeTest: async () => {
1010
cd('./tests');
11-
await $`pnpm playwright install --with-deps`;
11+
await $`pnpm exec playwright install --with-deps`;
1212
cd('..');
1313
},
1414
test: ['test'],

tests/rsbuild/rspress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function test(options: RunOptions) {
77
repo: 'web-infra-dev/rspress',
88
branch: process.env.RSPRESS_REF ?? 'main',
99
beforeTest: async () => {
10-
await $`pnpm playwright install --with-deps`;
10+
await $`pnpm exec playwright install --with-deps`;
1111
},
1212
test: ['test'],
1313
});

tests/rsbuild/rstest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function test(options: RunOptions) {
99
// ignore snapshot changes
1010
test: ['test -u'],
1111
beforeTest: async () => {
12-
await $`npx playwright install chromium webkit --with-deps`;
12+
await $`pnpm exec playwright install chromium --with-deps`;
1313
},
1414
});
1515
}

tests/rslib/modernjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function test(options: RunOptions) {
4444
},
4545
beforeTest: async () => {
4646
cd('tests/e2e/builder');
47-
await $`pnpm playwright install chromium`;
47+
await $`pnpm exec playwright install chromium`;
4848
cd('../../../');
4949
},
5050
test: ['test:ut', 'test:framework', 'test:builder'],

tests/rslib/rspress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function test(options: RunOptions) {
77
repo: 'web-infra-dev/rspress',
88
branch: process.env.RSPRESS ?? 'main',
99
beforeTest: async () => {
10-
await $`pnpm playwright install --with-deps`;
10+
await $`pnpm exec playwright install --with-deps`;
1111
},
1212
test: ['test'],
1313
});

tests/rslib/rstest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function test(options: RunOptions) {
88
branch: process.env.RSTEST ?? 'main',
99
test: ['test'],
1010
beforeTest: async () => {
11-
await $`npx playwright install chromium webkit --with-deps`;
11+
await $`pnpm exec playwright install chromium --with-deps`;
1212
},
1313
});
1414
}

tests/rspack/modernjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function test(options: RunOptions) {
4444
},
4545
beforeTest: async () => {
4646
cd('tests/e2e/builder');
47-
await $`pnpm playwright install chromium`;
47+
await $`pnpm exec playwright install chromium`;
4848
cd('../../../');
4949
},
5050
test: ['test:framework', 'test:builder'],

tests/rspack/rsbuild-rsc-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function test(options: RunOptions) {
77
repo: 'rstackjs/rsbuild-plugin-rsc',
88
beforeTest: async () => {
99
await $`pnpm run build`;
10-
await $`npx playwright install`;
10+
await $`pnpm exec playwright install`;
1111
},
1212
test: ['test'],
1313
});

tests/rspack/rsdoctor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function test(options: RunOptions) {
88
branch: process.env.RSDOCTOR ?? 'main',
99
beforeTest: async () => {
1010
cd('./e2e');
11-
await $`pnpm playwright install --with-deps`;
11+
await $`pnpm exec playwright install --with-deps`;
1212
cd('..');
1313
},
1414
test: ['test:all'],

0 commit comments

Comments
 (0)