You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
output.step(`I expect "${JSON.stringify(actualValue)}" to start with "${JSON.stringify(expectedValueToStartWith)}"`)
118
-
returnexpect(actualValue.startsWith(expectedValueToStartWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to start with "${expectedValueToStartWith}"` : `Expected "${actualValue}" to start with "${expectedValueToStartWith}"`).to.be.true
115
+
returnassert(actualValue.startsWith(expectedValueToStartWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to start with "${expectedValueToStartWith}"` : `Expected "${actualValue}" to start with "${expectedValueToStartWith}"`)
119
116
}
120
117
121
118
/**
@@ -129,7 +126,7 @@ class ExpectHelper {
129
126
output.step(
130
127
`I expect "${JSON.stringify(actualValue)}" to not start with "${JSON.stringify(expectedValueToNotStartWith)}"`,
131
128
)
132
-
returnexpect(actualValue.startsWith(expectedValueToNotStartWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to start with "${expectedValueToStartWith}"` : `Expected "${actualValue}" not to start with "${expectedValueToNotStartWith}"`).to.be.false
129
+
returnassert(!actualValue.startsWith(expectedValueToNotStartWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to start with "${expectedValueToNotStartWith}"` : `Expected "${actualValue}" not to start with "${expectedValueToNotStartWith}"`)
output.step(`I expect "${JSON.stringify(actualValue)}" to end with "${JSON.stringify(expectedValueToEndWith)}"`)
143
-
returnexpect(actualValue.endsWith(expectedValueToEndWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to end with "${expectedValueToEndWith}"` : `Expected "${actualValue}" to end with "${expectedValueToEndWith}"`).to.be.true
140
+
returnassert(actualValue.endsWith(expectedValueToEndWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" to end with "${expectedValueToEndWith}"` : `Expected "${actualValue}" to end with "${expectedValueToEndWith}"`)
144
141
}
145
142
146
143
/**
@@ -153,7 +150,7 @@ class ExpectHelper {
153
150
output.step(
154
151
`I expect "${JSON.stringify(actualValue)}" to not end with "${JSON.stringify(expectedValueToNotEndWith)}"`,
155
152
)
156
-
returnexpect(actualValue.endsWith(expectedValueToNotEndWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" not to end with "${expectedValueToNotEndWith}"` : `Expected "${actualValue}" not to end with "${expectedValueToNotEndWith}"`).to.be.false
153
+
returnassert(!actualValue.endsWith(expectedValueToNotEndWith),customErrorMsg ? `${customErrorMsg}: Expected "${actualValue}" not to end with "${expectedValueToNotEndWith}"` : `Expected "${actualValue}" not to end with "${expectedValueToNotEndWith}"`)
157
154
}
158
155
159
156
/**
@@ -176,7 +173,7 @@ class ExpectHelper {
176
173
output.step(
177
174
`I expect "${JSON.stringify(targetData)}" to match this JSON schema using AJV "${JSON.stringify(jsonSchema)}"`,
`I expect members of "${JSON.stringify(actualValue)}" and "${JSON.stringify(expectedValue)}" JSON objects are deeply equal excluding properties: ${JSON.stringify(fieldsToExclude)}`,
`I expect members of "${JSON.stringify(actualValue)}" and "${JSON.stringify(expectedValue)}" JSON objects are deeply equal excluding properties: ${JSON.stringify(fieldsToExclude)}`,
consterrorMessage=customErrorMsg ? `${customErrorMsg}: Expected "${JSON.stringify(actualValue)}" to match the pattern "${JSON.stringify(expectedPattern)}"` : `Expected "${JSON.stringify(actualValue)}" to match the pattern "${JSON.stringify(expectedPattern)}"`;
0 commit comments