This repository was archived by the owner on Mar 29, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed
Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 2121 npx cypress-expect \
2222 --min-passing 5 --pending 0
2323
24+ - name : Run e2e skip tests without grep 🧪
25+ run : |
26+ npx cypress-expect \
27+ --passing 1 --pending 2 \
28+ --spec cypress/integration/skip-spec.js \
29+ --config testFiles="skip-spec.js"
30+
31+ # all tests are pending
32+ # because the grep tag is only used in "it.skip" tests
33+ - name : Run e2e skip tests with grep 🧪
34+ run : |
35+ npx cypress-expect \
36+ --spec cypress/integration/skip-spec.js \
37+ --config testFiles="skip-spec.js" \
38+ --env grep=pending \
39+ --expect expects/pending.json
40+
2441 # there should be 1 test with "hello" substring
2542 # and 3 other tests that will be pending
2643 - name : Run tests with "hello" 🧪
Original file line number Diff line number Diff line change 1+ /// <reference types="cypress" />
2+ describe ( 'tests that use .skip' , ( ) => {
3+ it ( 'works' , ( ) => { } )
4+
5+ it . skip ( 'is pending' , ( ) => { } )
6+
7+ it . skip ( 'is pending again' , ( ) => { } )
8+ } )
Original file line number Diff line number Diff line change 1+ {
2+ "tests that use .skip" : {
3+ "works" : " pending" ,
4+ "is pending" : " pending" ,
5+ "is pending again" : " pending"
6+ }
7+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ function cypressGrep() {
3535 // skip tests without grep string in their names
3636 return _it . skip ( name , callback )
3737 }
38+
39+ // keep the "it.skip" the same as before
40+ it . skip = _it . skip
3841}
3942
4043module . exports = cypressGrep
You can’t perform that action at this time.
0 commit comments