Skip to content

Commit a628d79

Browse files
committed
chore(e2e): pass test flags through to the test command
1 parent 4190094 commit a628d79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dev-packages/e2e-tests/run.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ async function run(): Promise<void> {
4343

4444
// Allow to run a single app only via `yarn test:run <app-name>`
4545
const appName = process.argv[2] || '';
46+
// Forward any additional flags to the test command
47+
const testFlags = process.argv.slice(3);
4648

4749
const dsn = process.env.E2E_TEST_DSN || DEFAULT_DSN;
4850

@@ -87,7 +89,8 @@ async function run(): Promise<void> {
8789
await asyncExec('volta run pnpm test:build', { env, cwd });
8890

8991
console.log(`Testing ${testAppPath}...`);
90-
await asyncExec('volta run pnpm test:assert', { env, cwd });
92+
const testCommand = `volta run pnpm test:assert ${testFlags.join(' ')}`.trim();
93+
await asyncExec(testCommand, { env, cwd });
9194

9295
// clean up (although this is tmp, still nice to do)
9396
await rm(tmpDirPath, { recursive: true });

0 commit comments

Comments
 (0)