87
87
}
88
88
)
89
89
90
- Then ( / ^ i t p a s s e s $ / , ( ) => { } ) // eslint-disable-line @typescript-eslint/no-empty-function
90
+ Then ( ' it passes' , ( ) => { } ) // eslint-disable-line @typescript-eslint/no-empty-function
91
91
92
- Then ( / ^ i t f a i l s $ / , function ( this : World ) {
92
+ Then ( ' it fails' , function ( this : World ) {
93
93
const actualCode : number = doesHaveValue ( this . lastRun . error )
94
94
? this . lastRun . error . code
95
95
: 0
@@ -101,13 +101,13 @@ Then(/^it fails$/, function (this: World) {
101
101
this . verifiedLastRunError = true
102
102
} )
103
103
104
- Then ( / ^ i t o u t p u t s t h e t e x t : $ / , function ( this : World , text : string ) {
104
+ Then ( ' it outputs the text:' , function ( this : World , text : string ) {
105
105
const actualOutput = normalizeText ( this . lastRun . output )
106
106
const expectedOutput = normalizeText ( text )
107
107
expect ( actualOutput ) . to . eql ( expectedOutput )
108
108
} )
109
109
110
- Then ( / ^ t h e o u t p u t c o n t a i n s t h e t e x t : $ / , function ( this : World , text : string ) {
110
+ Then ( ' the output contains the text:' , function ( this : World , text : string ) {
111
111
const actualOutput = normalizeText ( this . lastRun . output )
112
112
const expectedOutput = normalizeText ( text )
113
113
expect ( actualOutput ) . to . include ( expectedOutput )
@@ -123,7 +123,7 @@ Then(
123
123
)
124
124
125
125
Then (
126
- / ^ t h e e r r o r o u t p u t c o n t a i n s t h e t e x t s n i p p e t s : $ / ,
126
+ ' the error output contains the text snippets:' ,
127
127
function ( this : World , table : DataTable ) {
128
128
const actualOutput = normalizeText ( this . lastRun . errorOutput )
129
129
table . rows ( ) . forEach ( ( row ) => {
@@ -134,7 +134,7 @@ Then(
134
134
)
135
135
136
136
Then (
137
- / ^ t h e e r r o r o u t p u t c o n t a i n s t h e t e x t : $ / ,
137
+ ' the error output contains the text:' ,
138
138
function ( this : World , text : string ) {
139
139
const actualOutput = normalizeText ( this . lastRun . errorOutput )
140
140
const expectedOutput = normalizeText ( text )
@@ -151,13 +151,13 @@ Then(
151
151
}
152
152
)
153
153
154
- Then ( / ^ I s e e t h e v e r s i o n o f C u c u m b e r $ / , function ( this : World ) {
154
+ Then ( ' I see the version of Cucumber' , function ( this : World ) {
155
155
const actualOutput = this . lastRun . output
156
156
const expectedOutput = `${ version as string } \n`
157
157
expect ( actualOutput ) . to . eql ( expectedOutput )
158
158
} )
159
159
160
- Then ( / ^ I s e e t h e h e l p t e x t f o r C u c u m b e r $ / , function ( this : World ) {
160
+ Then ( ' I see the help text for Cucumber' , function ( this : World ) {
161
161
const actualOutput = this . lastRun . output
162
162
const expectedOutput = 'Usage: cucumber-js'
163
163
expect ( actualOutput ) . to . include ( expectedOutput )
0 commit comments