find-cypress-specs 1.19.1 → 1.19.2

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/index.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [
package/src/index.js CHANGED
@@ -36,6 +36,12 @@ function getConfigTs(filename) {
36
36
  const configFilename = path.join(process.cwd(), filename)
37
37
  debug('loading Cypress config from %s', configFilename)
38
38
  const definedConfig = requireEveryTime(configFilename)
39
+ if (definedConfig && definedConfig.default) {
40
+ // due to TS / ES6 module transpile we got the default export
41
+ debug('returning default export as config from %s', filename)
42
+ return definedConfig.default
43
+ }
44
+
39
45
  return definedConfig
40
46
  }
41
47
 
@@ -156,10 +162,12 @@ function getSpecs() {
156
162
 
157
163
  function findCypressSpecs(options) {
158
164
  if (options.e2e) {
165
+ debug('config has "e2e" property, treating as Cypress v10+')
159
166
  const specs = findCypressSpecsV10(options)
160
167
  return specs
161
168
  }
162
169
 
170
+ debug('reading Cypress config < v10')
163
171
  const specs = findCypressSpecsV9(options)
164
172
  return specs
165
173
  }