Skip to content

Commit f24c0ff

Browse files
committed
dont use code coverage during local dev
1 parent 88664ec commit f24c0ff

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package-lock.json
44
# Cypress local support artifacts
55
cypress/screenshots
66
cypress/videos
7-
cypress/downloads/downloads.html
7+
cypress/downloads
88

99
# Logs
1010
logs

cypress/downloads/downloads.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

cypress/plugins/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ const webpack = require('@cypress/webpack-preprocessor');
1616
module.exports = (on, config) => {
1717
// `on` is used to hook into various events Cypress emits
1818
// `config` is the resolved Cypress config
19-
addMatchImageSnapshotPlugin(on, config);
20-
require('@cypress/code-coverage/task')(on, config);
21-
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'));
19+
20+
if (!!process.env.CI) {
21+
addMatchImageSnapshotPlugin(on, config);
22+
require('@cypress/code-coverage/task')(on, config);
23+
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'));
24+
}
2225

2326
// this fixes aliasing in cypres e2e tests
2427
// https://github.com/cypress-io/cypress/issues/3262#issuecomment-462646891

0 commit comments

Comments
 (0)