Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to include Cypress 10.0.0 integration #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ yarn add --dev dotenv cypress-dotenv

## Configure

Cypress (< 10.0.0)

Since this is a plugin, you will need to modify your file `cypress/plugins/index.js` to look something like this:

```javascript
Expand All @@ -45,6 +47,26 @@ module.exports = (on, config) => {
}
```

Cypress (>= 10.0.0)

According to [Migration Guide](https://docs.cypress.io/guides/references/migration-guide#Plugins-File-Removed):
The setupNodeEvents() config option is functionally equivalent to the function exported from the plugins file

```javascript
import { defineConfig } from 'cypress'
import dotenvPlugin from 'cypress-dotenv'

export default defineConfig({
e2e: {
...
setupNodeEvents(on, config) {
return dotenvPlugin(config)
},
},
...
})
```

## Options
This plugin takes three paramaters. The first parameter (which is mandatory) is the Cypress config object.

Expand Down