Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 0b94dcd

Browse files
committed
update the install blurb
1 parent 92738a0 commit 0b94dcd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,18 @@ npm i -D cypress-grep
3434
yarn add -D cypress-grep
3535
```
3636

37-
**required:** load this module from the [support file](https://on.cypress.io/writing-and-organizing-tests#Support-file) or at the top of the spec file if not using the support file.
37+
**required:** load this module from the [support file](https://on.cypress.io/writing-and-organizing-tests#Support-file) or at the top of the spec file if not using the support file. You improve the registration function and then call it:
3838

3939
```js
4040
// cypress/support/index.js
41-
// load and register the grep feature
41+
// load and register the grep feature using "require" function
4242
// https://github.com/cypress-io/cypress-grep
43-
require('cypress-grep')()
43+
const registerCypressGrep = require('cypress-grep')
44+
registerCypressGrep()
45+
46+
// if you want to use the "import" keyword
47+
import registerCypressGrep from 'cypress-grep'
48+
registerCypressGrep()
4449
```
4550

4651
### Plugin file

0 commit comments

Comments
 (0)