find-cypress-specs 1.27.0 → 1.27.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/package.json +1 -1
  2. package/src/index.js +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [
package/src/index.js CHANGED
@@ -183,10 +183,26 @@ function findCypressSpecsV10(opts = {}, type = 'e2e') {
183
183
  return filtered
184
184
  }
185
185
 
186
- function getSpecs(options, type = 'e2e') {
186
+ function getSpecs(options, type) {
187
187
  if (typeof options === 'undefined') {
188
188
  options = getConfig()
189
+ if (typeof type === 'undefined') {
190
+ type = 'e2e'
191
+ }
192
+ } else {
193
+ // we might have resolved config object
194
+ // passed from the "setupNode..." callback
195
+ if ('testingType' in options) {
196
+ type = options.testingType
197
+ options = {
198
+ [type]: {
199
+ specPattern: options.specPattern,
200
+ excludeSpecPattern: options.excludeSpecPattern,
201
+ },
202
+ }
203
+ }
189
204
  }
205
+
190
206
  return findCypressSpecs(options, type)
191
207
  }
192
208