How to use the jest-cli/build/cli.buildArgv function in jest-cli

To help you get started, we’ve selected a few jest-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github intraxia / wp-gistpen / commands / E2ECommand.tsx View on Github external
Kefir.stream(emitter => {
        process.env.NODE_ENV = 'test';
        process.env.BABEL_ENV = 'test';
        emitter.value(actions.testRun.request());
        jest.runCLI(buildArgv(argv), projects).then(({ results }) => {
          if (results.success) {
            emitter.value(actions.testRun.success());
          } else {
            emitter.value(actions.testRun.failure());
          }
          emitter.value(actions.shutdown.request());
        });
      })
    )