Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed May 21, 2021
1 parent 9806f56 commit 4f5d29d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .coverage.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-react"],
"plugins": ["istanbul", "@babel/plugin-transform-modules-commonjs"]
}
3 changes: 3 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
require('@cypress/code-coverage/task')(on, config)
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
return config
};
3 changes: 3 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
// Import commands.js using ES2015 syntax:
import './commands';

//Generate code-coverage
import '@cypress/code-coverage/support';

// Alternatively you can use CommonJS syntax:
// require('./commands')

Expand Down

0 comments on commit 4f5d29d

Please sign in to comment.