find-cypress-specs 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/bin/find.js +13 -8
  2. package/package.json +1 -1
package/bin/find.js CHANGED
@@ -14,15 +14,20 @@ const args = arg({
14
14
 
15
15
  const specs = getSpecs()
16
16
  if (args['--names']) {
17
- specs.forEach((filename) => {
18
- const source = fs.readFileSync(filename, 'utf8')
19
- const result = getTestNames(source, true)
20
- // enable if need to debug the parsed test
21
- // console.dir(result.structure, { depth: null })
22
- console.log(filename)
23
- console.log(formatTestList(result.structure))
17
+ if (!specs.length) {
18
+ console.log('no specs found')
19
+ } else {
24
20
  console.log('')
25
- })
21
+ specs.forEach((filename) => {
22
+ const source = fs.readFileSync(filename, 'utf8')
23
+ const result = getTestNames(source, true)
24
+ // enable if need to debug the parsed test
25
+ // console.dir(result.structure, { depth: null })
26
+ console.log(filename)
27
+ console.log(formatTestList(result.structure))
28
+ console.log('')
29
+ })
30
+ }
26
31
  } else {
27
32
  console.log(specs.join(','))
28
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [