How to use create-jest-runner - 9 common examples

To help you get started, we’ve selected a few create-jest-runner 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 TheBrainFamily / jest-runner-standard / index.js View on Github external
// index.js
const { createJestRunner } = require('create-jest-runner')
module.exports = createJestRunner(require.resolve('./run'))
github jest-community / jest-runner-eslint / src / index.js View on Github external
const { createJestRunner } = require('create-jest-runner');

const runner = createJestRunner(require.resolve('./runESLint'));

module.exports = runner;
github azz / jest-runner-tsc / src / index.js View on Github external
import { createJestRunner } from 'create-jest-runner';
import cosmiconfig from 'cosmiconfig';

const explorer = cosmiconfig('jest-runner-tsc');

const getExtraOptions = () => {
  const searchedFor = explorer.searchSync();
  if (!searchedFor || typeof searchedFor.config === 'undefined') {
    return {};
  }

  return searchedFor.config;
};

module.exports = createJestRunner(require.resolve('./runTsc'), {
  getExtraOptions,
});
github binygal / jest-runner-flowtype / src / FlowtypeRunner.js View on Github external
tests.forEach((t) => {
            let testResults;
            if (errorsPerFile[t.path]) {
              testResults = fail({
                start,
                end: +new Date(),
                test: { path: t.path, errorMessage: errorsPerFile[t.path] },
              });
            } else {
              testResults = pass({ start, end: +new Date(), test: { path: t.path } });
            }
            onResult(t, testResults);
          });
          resolve();
github jest-community / jest-runner-eslint / src / runner / runESLint.js View on Github external
const tooManyWarnings =
    cliOptions.maxWarnings >= 0 && report.warningCount > cliOptions.maxWarnings;
  if (tooManyWarnings) {
    return fail({
      start,
      end,
      test: {
        path: testPath,
        title: 'ESLint',
        errorMessage: `${message}\nESLint found too many warnings (maximum: ${cliOptions.maxWarnings}).`,
      },
    });
  }

  const result = pass({
    start,
    end,
    test: { path: testPath, title: 'ESLint' },
  });

  if (!cliOptions.quiet && report.warningCount > 0) {
    result.console = [{ message, origin: '', type: 'warn' }];
  }

  return result;
};
github binygal / jest-runner-flowtype / src / FlowtypeRunner.js View on Github external
tests.forEach((t) => {
            let testResults;
            if (errorsPerFile[t.path]) {
              testResults = fail({
                start,
                end: +new Date(),
                test: { path: t.path, errorMessage: errorsPerFile[t.path] },
              });
            } else {
              testResults = pass({ start, end: +new Date(), test: { path: t.path } });
            }
            onResult(t, testResults);
          });
          resolve();

create-jest-runner

A simple way of creating a Jest runner

MIT
Latest version published 2 years ago

Package Health Score

72 / 100
Full package analysis

Similar packages