How to use the jest-util.getConsoleOutput function in jest-util

To help you get started, we’ve selected a few jest-util 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 mozilla / addons-frontend / tests / jest-reporters / fingers-crossed.js View on Github external
printTestFileHeader(testPath, config, result) {
    this.log(getResultHeader(result, this._globalConfig, config));

    const consoleBuffer = result.console;
    const testFailed = result.numFailingTests > 0;

    if (testFailed && consoleBuffer && consoleBuffer.length) {
      // prettier-ignore
      this.log(
        `  ${TITLE_BULLET}Console\n\n${getConsoleOutput(
          config.cwd,
          !!this._globalConfig.verbose,
          consoleBuffer
        )}`
      );
    }
  }
}
github Khan / wonder-blocks / config / jest / log-on-fail-reporter.js View on Github external
printTestFileHeader(testPath, config, result) {
        this.log(getResultHeader(result, this._globalConfig, config));

        const consoleBuffer = result.console;
        const testFailed = result.numFailingTests > 0;

        if (testFailed && consoleBuffer && consoleBuffer.length) {
            // prettier-ignore
            this.log(
        `  ${TITLE_BULLET}Console\n\n${getConsoleOutput(
          config.cwd,
          !!this._globalConfig.verbose,
          consoleBuffer
        )}`
      );
        }
    }
}