find-cypress-specs 1.38.2 → 1.38.4

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
- # find-cypress-specs [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-13.6.1-brightgreen) [![ci](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml)
1
+ # find-cypress-specs [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-13.6.2-brightgreen) [![ci](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml)
2
2
 
3
3
  > Find Cypress spec files using the config settings
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.38.2",
3
+ "version": "1.38.4",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [
@@ -69,7 +69,7 @@
69
69
  "arg": "^5.0.1",
70
70
  "console.table": "^0.10.0",
71
71
  "debug": "^4.3.3",
72
- "find-test-names": "1.28.15",
72
+ "find-test-names": "1.28.17",
73
73
  "globby": "^11.1.0",
74
74
  "minimatch": "^3.0.4",
75
75
  "pluralize": "^8.0.0",
package/src/index.js CHANGED
@@ -457,8 +457,10 @@ function getTests(specs, options = {}) {
457
457
  .filter(Boolean)
458
458
  debug('filtering all tests by tag %o', splitTags)
459
459
  pickTaggedTestsFrom(jsonResults, splitTags)
460
- // debug(jsonResults)
460
+ debug('after picking tagged tests')
461
+ debug(jsonResults)
461
462
  // recompute the number of tests
463
+ debug('adding counts to json results')
462
464
  addCounts(jsonResults)
463
465
  } else if (skipped) {
464
466
  debug('leaving only skipped (pending) tests')
package/src/tagged.js CHANGED
@@ -1,3 +1,4 @@
1
+ const debug = require('debug')('find-cypress-specs:tagged')
1
2
  const { addCounts } = require('./count')
2
3
 
3
4
  function arraysOverlap(a, b) {
@@ -36,7 +37,8 @@ function pickTaggedTests(tests, tag) {
36
37
  return allTags && arraysOverlap(allTags, tags)
37
38
  } else if (test.type === 'suite') {
38
39
  const allTags = combineTags(test.tags, test.requiredTags)
39
- if (allTags && arraysOverlap(test.tags, tags)) {
40
+ debug('allTags %o', allTags)
41
+ if (allTags && arraysOverlap(allTags, tags)) {
40
42
  return true
41
43
  }
42
44
 
@@ -87,8 +89,10 @@ function removeEmptyNodes(json) {
87
89
  * Modifies the given object in place.
88
90
  */
89
91
  function pickTaggedTestsFrom(json, tag) {
92
+ // console.log(JSON.stringify(json, null, 2))
90
93
  Object.keys(json).forEach((filename) => {
91
94
  const fileTests = json[filename].tests
95
+ debug('picking tagged tests from %s', filename)
92
96
  pickTaggedTests(fileTests, tag)
93
97
  })
94
98