Skip to content

Commit d70c4df

Browse files
authored
Merge branch 'main' into master
2 parents 4187469 + 08d8cac commit d70c4df

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

features/step_definitions/cli_steps.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ When(
8787
}
8888
)
8989

90-
Then(/^it passes$/, () => {}) // eslint-disable-line @typescript-eslint/no-empty-function
90+
Then('it passes', () => {}) // eslint-disable-line @typescript-eslint/no-empty-function
9191

92-
Then(/^it fails$/, function (this: World) {
92+
Then('it fails', function (this: World) {
9393
const actualCode: number = doesHaveValue(this.lastRun.error)
9494
? this.lastRun.error.code
9595
: 0
@@ -101,13 +101,13 @@ Then(/^it fails$/, function (this: World) {
101101
this.verifiedLastRunError = true
102102
})
103103

104-
Then(/^it outputs the text:$/, function (this: World, text: string) {
104+
Then('it outputs the text:', function (this: World, text: string) {
105105
const actualOutput = normalizeText(this.lastRun.output)
106106
const expectedOutput = normalizeText(text)
107107
expect(actualOutput).to.eql(expectedOutput)
108108
})
109109

110-
Then(/^the output contains the text:$/, function (this: World, text: string) {
110+
Then('the output contains the text:', function (this: World, text: string) {
111111
const actualOutput = normalizeText(this.lastRun.output)
112112
const expectedOutput = normalizeText(text)
113113
expect(actualOutput).to.include(expectedOutput)
@@ -123,7 +123,7 @@ Then(
123123
)
124124

125125
Then(
126-
/^the error output contains the text snippets:$/,
126+
'the error output contains the text snippets:',
127127
function (this: World, table: DataTable) {
128128
const actualOutput = normalizeText(this.lastRun.errorOutput)
129129
table.rows().forEach((row) => {
@@ -134,7 +134,7 @@ Then(
134134
)
135135

136136
Then(
137-
/^the error output contains the text:$/,
137+
'the error output contains the text:',
138138
function (this: World, text: string) {
139139
const actualOutput = normalizeText(this.lastRun.errorOutput)
140140
const expectedOutput = normalizeText(text)
@@ -151,13 +151,13 @@ Then(
151151
}
152152
)
153153

154-
Then(/^I see the version of Cucumber$/, function (this: World) {
154+
Then('I see the version of Cucumber', function (this: World) {
155155
const actualOutput = this.lastRun.output
156156
const expectedOutput = `${version as string}\n`
157157
expect(actualOutput).to.eql(expectedOutput)
158158
})
159159

160-
Then(/^I see the help text for Cucumber$/, function (this: World) {
160+
Then('I see the help text for Cucumber', function (this: World) {
161161
const actualOutput = this.lastRun.output
162162
const expectedOutput = 'Usage: cucumber-js'
163163
expect(actualOutput).to.include(expectedOutput)

0 commit comments

Comments
 (0)