MCPcopy
hub / github.com/vercel/next.js / run

Function run

test/integration/create-next-app/utils.ts:17–37  ·  view source on GitHub ↗
(
  args: string[],
  nextJSVersion: string,
  options:
    | execa.Options
    | {
        reject?: boolean
        env?: Record<string, string>
      }
)

Source from the content-addressed store, hash-verified

15]
16
17export const run = async (
18 args: string[],
19 nextJSVersion: string,
20 options:
21 | execa.Options
22 | {
23 reject?: boolean
24 env?: Record<string, string>
25 }
26) => {
27 return execa('node', [CNA_PATH].concat(args), {
28 // tests with options.reject false are expected to exit(1) so don't inherit
29 stdio: options.reject === false ? 'pipe' : 'inherit',
30 ...options,
31 env: {
32 ...process.env,
33 ...options.env,
34 NEXT_PRIVATE_TEST_VERSION: nextJSVersion,
35 },
36 })
37}
38
39export const command = (cmd: string, args: string[]) =>
40 execa(cmd, args, {

Callers 12

index.test.tsFile · 0.90
examples.test.tsFile · 0.90
app.test.tsFile · 0.90
app-api.test.tsFile · 0.90
pages.test.tsFile · 0.90
matrix.test.tsFile · 0.90
bun.test.tsFile · 0.90
pnpm.test.tsFile · 0.90
npm.test.tsFile · 0.90
yarn.test.tsFile · 0.90

Calls 1

concatMethod · 0.45

Tested by

no test coverage detected