Skip to content

Commit

Permalink
fix: allow disable or disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jun 2, 2023
1 parent 1d40f28 commit 4c0c44c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ If you have an object with coverage settings, you can still disable it
}
```

**Tip:** you can use `disable: true` or `disabled: true`

See [Cypress environment variables](https://on.cypress.io/environment-variables) and [support.js](support.js). You can try running without code coverage in this project yourself

```shell
Expand Down
5 changes: 3 additions & 2 deletions common-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ function isPluginDisabled(cyEnv) {
return true
}
if (typeof cyEnv.coverage === 'object') {
// the user explicitly disabled
return cyEnv.coverage.disabled === true
// the user explicitly disabled the plugin
// be kind and accept both "disable" and "disabled" options
return cyEnv.coverage.disable === true || cyEnv.coverage.disabled === true
}

// by default the plugin is enabled
Expand Down

0 comments on commit 4c0c44c

Please sign in to comment.