Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Latest commit

 

History

History
62 lines (50 loc) · 1.76 KB

readme.md

File metadata and controls

62 lines (50 loc) · 1.76 KB

start-jest

npm linux build windows build coverage deps

Jest task for Start.

Install

npm install --save-dev start-jest
# or
yarn add --dev start-jest

Usage

import Start from 'start';
import reporter from 'start-pretty-reporter';
import env from 'start-env';
import jest from 'start-jest';

const start = Start(reporter());

export const test = () => start(
  env('NODE_ENV', 'test'),
  jest({
    moduleNameMapper: {
      '^~/(.*)$': '<rootDir>/packages/$1'
    },
    roots: [
      '<rootDir>/packages/neoform/'
    ],
    testMatch: [
      '**/tests/*.jsx'
    ],
    collectCoverage: true,
    collectCoverageFrom: [
      '**/src/*.jsx'
    ],
    coverageReporters: [
      'lcov',
      'text-summary'
    ],
    snapshotSerializers: [
      'enzyme-to-json/serializer'
    ]
  })
);

Arguments

jest(options)

💁 { config: '.jestrc' }