@bahmutov/cy-grep 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @bahmutov/cy-grep ![cypress version](https://img.shields.io/badge/cypress-15.5.0-brightgreen)
1
+ # @bahmutov/cy-grep ![cypress version](https://img.shields.io/badge/cypress-15.12.0-brightgreen)
2
2
 
3
3
  > Filter tests using substring or tag
4
4
 
@@ -771,7 +771,7 @@ Start Cypress with the environment variable `DEBUG=cy-grep`. You will see a few
771
771
  ```
772
772
  $ DEBUG=cy-grep npx cypress run --expose grep=works,grepFilterSpecs=true
773
773
  cy-grep: tests with "works" in their names
774
- cy-grep: filtering specs using "works" in the title
774
+ cy-grep: filtering specs using "works" in the test title
775
775
  cy-grep Cypress config env object: { grep: 'works', grepFilterSpecs: true }
776
776
  ...
777
777
  cy-grep found 1 spec files +5ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmutov/cy-grep",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Filter Cypress tests using title or tags",
5
5
  "main": "src/support.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "globby": "^11.1.0"
21
21
  },
22
22
  "devDependencies": {
23
- "cypress": "15.11.0",
23
+ "cypress": "15.12.0",
24
24
  "cypress-each": "^1.11.0",
25
25
  "cypress-expect": "^3.1.0",
26
26
  "prettier": "^3.8.1",
package/src/plugin.js CHANGED
@@ -80,6 +80,17 @@ function getGrepSettings(config) {
80
80
  console.log('cy-grep: all tags will be forced to start with @')
81
81
  }
82
82
 
83
+ // expose the collected config values
84
+ // so that the browser support code can use them
85
+ config.expose = config.expose || {}
86
+ config.expose.grep = grep
87
+ config.expose.grepTags = grepTags
88
+ config.expose.grepBurn = grepBurn
89
+ config.expose.grepUntagged = grepUntagged
90
+ config.expose.grepOmitFiltered = omitFiltered
91
+ config.expose.grepFilterSpecs = grepFilterSpecs
92
+ config.expose.grepPrefixAt = grepPrefixAt
93
+
83
94
  return { grep, grepTags, grepFilterSpecs, grepPrefixAt }
84
95
  }
85
96
 
@@ -131,7 +142,7 @@ function cypressGrepPlugin(config) {
131
142
  let greppedSpecs = []
132
143
 
133
144
  if (grep) {
134
- console.log('cy-grep: filtering specs using "%s" in the title', grep)
145
+ console.log('cy-grep: filtering specs using "%s" in the test title', grep)
135
146
  const parsedGrep = parseGrep(grep, undefined, grepPrefixAt)
136
147
 
137
148
  debug('parsed grep %o', parsedGrep)