Skip to content

Commit

Permalink
fix(update jest config): update jest config json to add coverage thre…
Browse files Browse the repository at this point in the history
…shold and other params
  • Loading branch information
pritam001 committed Mar 1, 2020
1 parent 3e47c1b commit 66f3b4a
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea
/coverage
/node_modules
calci-lib-*.tgz
36 changes: 23 additions & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,39 @@ module.exports = {
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
collectCoverage: true,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
collectCoverageFrom: [
"src/*.js"
],

// The directory where Jest should output its coverage files
coverageDirectory: "coverage",

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
// ],
coveragePathIgnorePatterns: [
"/node_modules/"
],

// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
coverageReporters: [
"json",
"lcov",
"html",
"text",
"clover"
],

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,
coverageThreshold: {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},

// A path to a custom dependency extractor
// dependencyExtractor: undefined,
Expand Down Expand Up @@ -132,7 +142,7 @@ module.exports = {
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: "node",
testEnvironment: "jsdom",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
Expand Down
Loading

0 comments on commit 66f3b4a

Please sign in to comment.