Skip to content

Commit

Permalink
Experiment with cypress coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Feb 13, 2020
1 parent 7716d26 commit 52809e3
Show file tree
Hide file tree
Showing 7 changed files with 1,537 additions and 40 deletions.
1 change: 1 addition & 0 deletions .nyc_output/out.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
14 changes: 14 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,18 @@ module.exports = {
},
],
],
env: {
test: {
plugins: [
[
'istanbul',
{
all: true,
excludeNodeModules: false,
include: ['**/node_modules/@material-ui/pickers/**'],
},
],
],
},
},
};
10 changes: 10 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"engines": {
"node": "12.x"
},
"nyc": {
"all": true,
"excludeNodeModules": false,
"include": [
"../**/node_modules/@material-ui/pickers/**",
"../lib/**"
]
},
"dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@date-io/hijri": "^2.2.0",
Expand Down Expand Up @@ -75,6 +83,8 @@
"typescript": "^3.4.4"
},
"devDependencies": {
"@babel/plugin-syntax-jsx": "^7.8.3",
"babel-plugin-istanbul": "^6.0.0",
"dotenv": "^7.0.0",
"eslint-plugin-react": "^7.12.4",
"fs-extra": "^7.0.1",
Expand Down
1 change: 1 addition & 0 deletions e2e/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ module.exports = on => {
};

on('file:preprocessor', wp(options));
on('task', require('@cypress/code-coverage/task'));
};
2 changes: 1 addition & 1 deletion e2e/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

// Import commands.js using ES2015 syntax:
require('./commands');

import '@cypress/code-coverage/support';
// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/runtime": "^7.7.5",
"@cypress/code-coverage": "^1.12.1",
"@cypress/webpack-preprocessor": "^4.1.0",
"@percy/cypress": "^1.0.9",
"@typescript-eslint/eslint-plugin": "^1.6.0",
Expand All @@ -44,6 +45,7 @@
"eslint-plugin-react-hooks": "^1.6.0",
"husky": "^1.1.2",
"lint-staged": "^7.3.0",
"nyc": "13.x",
"prettier": "^1.14.3",
"wait-on": "^4.0.0"
},
Expand Down
Loading

0 comments on commit 52809e3

Please sign in to comment.