@bahmutov/cy-grep 2.0.17 → 2.0.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.js +9 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmutov/cy-grep",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "Filter Cypress tests using title or tags",
5
5
  "main": "src/support.js",
6
6
  "scripts": {
package/src/plugin.js CHANGED
@@ -155,17 +155,20 @@ function cypressGrepPlugin(config) {
155
155
  // and the values being arrays of effective test tags
156
156
  debug('spec file %s', specFile)
157
157
  debug('effective test tags %o', testTags)
158
- return Object.keys(testTags).some((testTitle) => {
159
- const effectiveTags = testTags[testTitle].effectiveTags
160
- const requiredTags = testTags[testTitle].requiredTags
161
158
 
162
- // remember all found tags
163
- effectiveTags.forEach((tag) => {
159
+ // remember all found tags
160
+ Object.entries(testTags).forEach(([testTitle, tags]) => {
161
+ tags.effectiveTags.forEach((tag) => {
164
162
  foundTags.add(tag)
165
163
  })
166
- requiredTags.forEach((tag) => {
164
+ tags.requiredTags.forEach((tag) => {
167
165
  foundTags.add(tag)
168
166
  })
167
+ });
168
+
169
+ return Object.keys(testTags).some((testTitle) => {
170
+ const effectiveTags = testTags[testTitle].effectiveTags
171
+ const requiredTags = testTags[testTitle].requiredTags
169
172
 
170
173
  return shouldTestRun(
171
174
  parsedGrep,