FoushWare / React_typescript_coding_blocks

My workflow for JavaScript (React, NodeJS)…consists of Jest, ESLint, typescript, husky, webpack, Babel
1 stars 0 forks source link

Change coverage in jest file because it get error in CI [not tests yet] #15

Open FoushWare opened 3 years ago

FoushWare commented 3 years ago

jest.config.js

module.exports = {
  ...require('./test/jest-common'),
  collectCoverageFrom: [
    '**/src/**/*.js',
  ] /** include all the project files in coverage not only the test files */,
  coverageThreshold: {
    global: {
      statements: 0,
      branches: 0,
      functions: 0,
      lines: 0,
    },
    //When makeing specific rules for files respect to coverage .. it subtract it's percenge from the global setting Above
    // './src/shared/utils.js': {
    //   // make this file strick for coverage ..if anyone change function or add function make sure every line in covered in testing
    //   statements: 100,
    //   branches: 80,
    //   functions: 100,
    //   lines: 100,
    // },
  },
  projects: [
    './test/jest.client.js',
    './test/jest.server.js',
    './test/jest.lint.js',
  ],
}