This repository was archived by the owner on Mar 29, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ To use this module with [Cypress v10.0.0](https://docs.cypress.io/guides/referen
79
79
80
80
``` js
81
81
{
82
- env: { grepNewConfig: true },
83
82
e2e: {
84
83
setupNodeEvents (on , config ) {
85
84
require (' cypress-grep/src/plugin' )(config);
Original file line number Diff line number Diff line change @@ -17,9 +17,12 @@ function cypressGrepPlugin(config) {
17
17
18
18
const { env } = config
19
19
20
+ // detecting which version is running using specPattern - specPattern is only present from v10.0.0+
21
+ const isAtLeastV10 = config . e2e . specPattern || config . component . specPattern
22
+
20
23
debug (
21
24
'Config type: %s' ,
22
- env . grepNewConfig
25
+ isAtLeastV10
23
26
? 'new (Cypress version >= v10.0.0)'
24
27
: 'legacy (Cypress version < v10.0.0)' ,
25
28
)
@@ -117,7 +120,7 @@ function cypressGrepPlugin(config) {
117
120
debug ( '%o' , greppedSpecs )
118
121
}
119
122
if ( greppedSpecs . length ) {
120
- env . grepNewConfig
123
+ isAtLeastV10
121
124
? ( config . specPattern = greppedSpecs )
122
125
: ( config . testFiles = greppedSpecs )
123
126
} else {
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ function parseTagsGrep(s) {
77
77
} )
78
78
79
79
// filter out undefined from explicit not tags
80
- const ORS_filtered = ORS . filter ( x => x !== undefined )
81
- if ( explicitNotTags . length > 0 ) {
80
+ const ORS_filtered = ORS . filter ( ( x ) => x !== undefined )
81
+ if ( explicitNotTags . length > 0 ) {
82
82
ORS_filtered . forEach ( ( OR , index ) => {
83
83
ORS_filtered [ index ] = OR . concat ( explicitNotTags )
84
84
} )
You can’t perform that action at this time.
0 commit comments