* These e2e tests are running via a child process, because we're running in a VM and are not allowed to `import` directly * It also represents a more real-world example of how to run.
( configFile: string | undefined, options: ProxyReadJestConfigOptions, )
| 22 | * It also represents a more real-world example of how to run. |
| 23 | */ |
| 24 | async function proxyReadInitialOptions( |
| 25 | configFile: string | undefined, |
| 26 | options: ProxyReadJestConfigOptions, |
| 27 | ): ReturnType<typeof readInitialOptions> { |
| 28 | const {stdout} = await execa( |
| 29 | 'node', |
| 30 | [ |
| 31 | require.resolve('../read-initial-options/readOptions.js'), |
| 32 | configFile ?? '', |
| 33 | JSON.stringify(options), |
| 34 | ], |
| 35 | {cwd: options?.cwd}, |
| 36 | ); |
| 37 | return JSON.parse(stdout); |
| 38 | } |
| 39 | |
| 40 | describe('readInitialOptions', () => { |
| 41 | test('should read from the cwd by default', async () => { |
no test coverage detected