(port: number, shouldPass: boolean)
| 8 | const fixtureConfig = resolve(appRoot, "test-fixtures/test-globalsetup-exit/vitest.config.ts"); |
| 9 | |
| 10 | const runFixture = (port: number, shouldPass: boolean) => |
| 11 | spawnSync(process.execPath, [vitestBin, "run", "--config", fixtureConfig], { |
| 12 | cwd: appRoot, |
| 13 | encoding: "utf8", |
| 14 | timeout: 60_000, |
| 15 | env: { |
| 16 | ...process.env, |
| 17 | CLOUD_TEST_DB_PORT: String(port), |
| 18 | TEST_GLOBALSETUP_SHOULD_PASS: String(shouldPass), |
| 19 | }, |
| 20 | }); |
| 21 | |
| 22 | const diagnostic = (result: ReturnType<typeof runFixture>): string => |
| 23 | [result.stdout, result.stderr].filter(Boolean).join("\n"); |
no outgoing calls
no test coverage detected