MCPcopy
hub / github.com/jestjs/jest / proxyReadInitialOptions

Function proxyReadInitialOptions

e2e/__tests__/readInitialOptions.test.ts:24–38  ·  view source on GitHub ↗

* 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,
)

Source from the content-addressed store, hash-verified

22 * It also represents a more real-world example of how to run.
23 */
24async 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
40describe('readInitialOptions', () => {
41 test('should read from the cwd by default', async () => {

Callers 1

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected