find-cypress-specs 1.28.0 → 1.29.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 +6 -0
- package/package.json +7 -5
- package/src/index.js +4 -0
- package/src/print.js +1 -0
package/README.md
CHANGED
|
@@ -234,6 +234,12 @@ Run the utility with environment variable `DEBUG=find-cypress-specs` to see the
|
|
|
234
234
|
|
|
235
235
|

|
|
236
236
|
|
|
237
|
+
Finding tests in the individual specs uses [find-test-names](https://github.com/bahmutov/find-test-names) so you might want to enable debugging both modules at once:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
$ DEBUG=find-cypress-specs,find-test-names npx find-cypress-specs --names
|
|
241
|
+
```
|
|
242
|
+
|
|
237
243
|
## Videos
|
|
238
244
|
|
|
239
245
|
- [Use Ava Snapshots And Execa-wrap To Write End-to-End Tests For CLI Utilities](https://youtu.be/rsw17RqP0G0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "find-cypress-specs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Find Cypress spec files using the config settings",
|
|
5
5
|
"main": "src",
|
|
6
6
|
"files": [
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "ava",
|
|
15
|
+
"prod-deps": "npm audit --report --omit dev",
|
|
15
16
|
"cy:run": "DEBUG=cypress:cli,cypress:server:specs cypress run",
|
|
16
17
|
"demo": "DEBUG=find-cypress-specs node ./bin/find",
|
|
17
18
|
"demo-names": "DEBUG=find-cypress-specs node ./bin/find --names",
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
"semantic-release": "semantic-release",
|
|
29
30
|
"deps": "spec-change --folder . --mask 'cypress/**/*.{js,ts}'",
|
|
30
31
|
"deps-changed": "DEBUG=find-cypress-specs node ./bin/find --branch main --parent --trace-imports cypress --time-trace --cache-trace",
|
|
31
|
-
"demo-component": "DEBUG=find-cypress-specs node ./bin/find --component --names"
|
|
32
|
+
"demo-component": "DEBUG=find-cypress-specs node ./bin/find --component --names",
|
|
33
|
+
"demo-exclusive": "npm run test-names --prefix test-exclusive --silent"
|
|
32
34
|
},
|
|
33
35
|
"repository": {
|
|
34
36
|
"type": "git",
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"execa-wrap": "^1.4.0",
|
|
50
52
|
"prettier": "^2.5.1",
|
|
51
53
|
"really-need": "^1.9.2",
|
|
52
|
-
"semantic-release": "20.1.
|
|
54
|
+
"semantic-release": "20.1.1",
|
|
53
55
|
"sinon": "^13.0.1",
|
|
54
56
|
"typescript": "^4.6.3"
|
|
55
57
|
},
|
|
@@ -58,11 +60,11 @@
|
|
|
58
60
|
"arg": "^5.0.1",
|
|
59
61
|
"console.table": "^0.10.0",
|
|
60
62
|
"debug": "^4.3.3",
|
|
61
|
-
"find-test-names": "1.
|
|
63
|
+
"find-test-names": "1.28.1",
|
|
62
64
|
"globby": "^11.0.4",
|
|
63
65
|
"minimatch": "^3.0.4",
|
|
64
66
|
"pluralize": "^8.0.0",
|
|
65
|
-
"require-and-forget": "^1.0.
|
|
67
|
+
"require-and-forget": "^1.0.1",
|
|
66
68
|
"shelljs": "^0.8.5",
|
|
67
69
|
"spec-change": "^1.6.0",
|
|
68
70
|
"ts-node": "^10.9.1"
|
package/src/index.js
CHANGED
|
@@ -145,6 +145,7 @@ function findCypressSpecsV10(opts = {}, type = 'e2e') {
|
|
|
145
145
|
|
|
146
146
|
debug('options v10 %o', options)
|
|
147
147
|
|
|
148
|
+
/** @type string[] */
|
|
148
149
|
const files = globby.sync(options.specPattern, {
|
|
149
150
|
sort: true,
|
|
150
151
|
ignore: options.excludeSpecPattern,
|
|
@@ -241,6 +242,9 @@ function collectResults(structure, results) {
|
|
|
241
242
|
if (t.pending) {
|
|
242
243
|
info.pending = t.pending
|
|
243
244
|
}
|
|
245
|
+
if (t.exclusive) {
|
|
246
|
+
info.exclusive = t.exclusive
|
|
247
|
+
}
|
|
244
248
|
results.push(info)
|
|
245
249
|
if (t.type === 'suite') {
|
|
246
250
|
if (t.suites && t.suites.length) {
|
package/src/print.js
CHANGED
|
@@ -11,6 +11,7 @@ function stringFileTests(fileName, fileInfo) {
|
|
|
11
11
|
? `${fileName} (${testCount}, ${fileInfo.counts.pending} pending)`
|
|
12
12
|
: `${fileName} (${testCount})`
|
|
13
13
|
|
|
14
|
+
// console.log(fileInfo.tests)
|
|
14
15
|
const body = formatTestList(fileInfo.tests)
|
|
15
16
|
|
|
16
17
|
return headerLine + '\n' + body + '\n'
|