Skip to content

Commit 405f729

Browse files
committed
test(desktop): drop the outer runner's variables with the shared omit helper
1 parent b39a245 commit 405f729

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/desktop/e2e/check-report.spec.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { tmpdir } from 'node:os'
55
import { join } from 'node:path'
66
import { fileURLToPath } from 'node:url'
77
import { expect, test } from '@playwright/test'
8+
import { omit } from '@sim/utils/object'
89
import type { ReportCheck } from './check-report'
910

1011
/**
@@ -26,8 +27,9 @@ test('a check that failed before the worker restarted stays in the report', () =
2627
})
2728
)
2829
// The outer run's worker variables would make the nested runner think it is a worker.
29-
const env = Object.fromEntries(
30-
Object.entries(process.env).filter(([key]) => !/^(TEST_|PW_)/.test(key))
30+
const env = omit(
31+
process.env,
32+
Object.keys(process.env).filter((key) => /^(TEST_|PW_)/.test(key))
3133
)
3234

3335
const run = spawnSync(process.execPath, [CLI, 'test', '--config', CONFIG], {

0 commit comments

Comments
 (0)