Skip to content

Commit b4b6dd8

Browse files
authored
fix: expect helper to have custom error message as optional param (#4082)
1 parent 0341547 commit b4b6dd8

File tree

2 files changed

+64
-64
lines changed

2 files changed

+64
-64
lines changed

docs/helpers/Expect.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,32 @@ Zero-configuration when paired with other helpers like REST, Playwright:
3232
#### Parameters
3333

3434
- `targetData` **any**
35-
- `aboveThan` **any** number | Date
36-
- `customErrorMsg` **any**
35+
- `aboveThan` **any**
36+
- `customErrorMsg` **any?**
3737

3838
### expectBelow
3939

4040
#### Parameters
4141

4242
- `targetData` **any**
43-
- `belowThan` **any** number | Date
44-
- `customErrorMsg` **any**
43+
- `belowThan` **any**
44+
- `customErrorMsg` **any?**
4545

4646
### expectContain
4747

4848
#### Parameters
4949

5050
- `actualValue` **any**
5151
- `expectedValueToContain` **any**
52-
- `customErrorMsg` **any**
52+
- `customErrorMsg` **any?**
5353

5454
### expectDeepEqual
5555

5656
#### Parameters
5757

5858
- `actualValue` **any**
5959
- `expectedValue` **any**
60-
- `customErrorMsg` **any**
60+
- `customErrorMsg` **any?**
6161

6262
### expectDeepEqualExcluding
6363

@@ -68,7 +68,7 @@ expects members of two JSON objects are deeply equal excluding some properties
6868
- `actualValue` **any**
6969
- `expectedValue` **any**
7070
- `fieldsToExclude` **any**
71-
- `customErrorMsg` **any**
71+
- `customErrorMsg` **any?**
7272

7373
### expectDeepIncludeMembers
7474

@@ -78,7 +78,7 @@ expects an array to be a superset of another array
7878

7979
- `superset` **any**
8080
- `set` **any**
81-
- `customErrorMsg` **any**
81+
- `customErrorMsg` **any?**
8282

8383
### expectDeepMembers
8484

@@ -88,77 +88,77 @@ expects members of two arrays are deeply equal
8888

8989
- `actualValue` **any**
9090
- `expectedValue` **any**
91-
- `customErrorMsg` **any**
91+
- `customErrorMsg` **any?**
9292

9393
### expectEmpty
9494

9595
#### Parameters
9696

9797
- `targetData` **any**
98-
- `customErrorMsg` **any**
98+
- `customErrorMsg` **any?**
9999

100100
### expectEndsWith
101101

102102
#### Parameters
103103

104104
- `actualValue` **any**
105105
- `expectedValueToEndWith` **any**
106-
- `customErrorMsg` **any**
106+
- `customErrorMsg` **any?**
107107

108108
### expectEqual
109109

110110
#### Parameters
111111

112112
- `actualValue` **any**
113113
- `expectedValue` **any**
114-
- `customErrorMsg` **any**
114+
- `customErrorMsg` **any?**
115115

116116
### expectEqualIgnoreCase
117117

118118
#### Parameters
119119

120120
- `actualValue` **any**
121121
- `expectedValue` **any**
122-
- `customErrorMsg` **any**
122+
- `customErrorMsg` **any?**
123123

124124
### expectFalse
125125

126126
#### Parameters
127127

128128
- `targetData` **any**
129-
- `customErrorMsg` **any**
129+
- `customErrorMsg` **any?**
130130

131131
### expectHasAProperty
132132

133133
#### Parameters
134134

135135
- `targetData` **any**
136136
- `propertyName` **any**
137-
- `customErrorMsg` **any**
137+
- `customErrorMsg` **any?**
138138

139139
### expectHasProperty
140140

141141
#### Parameters
142142

143143
- `targetData` **any**
144144
- `propertyName` **any**
145-
- `customErrorMsg` **any**
145+
- `customErrorMsg` **any?**
146146

147147
### expectJsonSchema
148148

149149
#### Parameters
150150

151151
- `targetData` **any**
152152
- `jsonSchema` **any**
153-
- `customErrorMsg` **any**
153+
- `customErrorMsg` **any?**
154154

155155
### expectJsonSchemaUsingAJV
156156

157157
#### Parameters
158158

159159
- `targetData` **any**
160160
- `jsonSchema` **any**
161-
- `customErrorMsg` **any**
161+
- `customErrorMsg` **any?**
162162
- `ajvOptions` **any** Pass AJV options
163163

164164
### expectLengthAboveThan
@@ -167,23 +167,23 @@ expects members of two arrays are deeply equal
167167

168168
- `targetData` **any**
169169
- `lengthAboveThan` **any**
170-
- `customErrorMsg` **any**
170+
- `customErrorMsg` **any?**
171171

172172
### expectLengthBelowThan
173173

174174
#### Parameters
175175

176176
- `targetData` **any**
177177
- `lengthBelowThan` **any**
178-
- `customErrorMsg` **any**
178+
- `customErrorMsg` **any?**
179179

180180
### expectLengthOf
181181

182182
#### Parameters
183183

184184
- `targetData` **any**
185185
- `length` **any**
186-
- `customErrorMsg` **any**
186+
- `customErrorMsg` **any?**
187187

188188
### expectMatchesPattern
189189

@@ -193,83 +193,83 @@ expects a JSON object matches a provided pattern
193193

194194
- `actualValue` **any**
195195
- `expectedPattern` **any**
196-
- `customErrorMsg` **any**
196+
- `customErrorMsg` **any?**
197197

198198
### expectMatchRegex
199199

200200
#### Parameters
201201

202202
- `targetData` **any**
203203
- `regex` **any**
204-
- `customErrorMsg` **any**
204+
- `customErrorMsg` **any?**
205205

206206
### expectNotContain
207207

208208
#### Parameters
209209

210210
- `actualValue` **any**
211211
- `expectedValueToNotContain` **any**
212-
- `customErrorMsg` **any**
212+
- `customErrorMsg` **any?**
213213

214214
### expectNotDeepEqual
215215

216216
#### Parameters
217217

218218
- `actualValue` **any**
219219
- `expectedValue` **any**
220-
- `customErrorMsg` **any**
220+
- `customErrorMsg` **any?**
221221

222222
### expectNotEndsWith
223223

224224
#### Parameters
225225

226226
- `actualValue` **any**
227227
- `expectedValueToNotEndWith` **any**
228-
- `customErrorMsg` **any**
228+
- `customErrorMsg` **any?**
229229

230230
### expectNotEqual
231231

232232
#### Parameters
233233

234234
- `actualValue` **any**
235235
- `expectedValue` **any**
236-
- `customErrorMsg` **any**
236+
- `customErrorMsg` **any?**
237237

238238
### expectNotStartsWith
239239

240240
#### Parameters
241241

242242
- `actualValue` **any**
243243
- `expectedValueToNotStartWith` **any**
244-
- `customErrorMsg` **any**
244+
- `customErrorMsg` **any?**
245245

246246
### expectStartsWith
247247

248248
#### Parameters
249249

250250
- `actualValue` **any**
251251
- `expectedValueToStartWith` **any**
252-
- `customErrorMsg` **any**
252+
- `customErrorMsg` **any?**
253253

254254
### expectToBeA
255255

256256
#### Parameters
257257

258258
- `targetData` **any**
259259
- `type` **any**
260-
- `customErrorMsg` **any**
260+
- `customErrorMsg` **any?**
261261

262262
### expectToBeAn
263263

264264
#### Parameters
265265

266266
- `targetData` **any**
267267
- `type` **any**
268-
- `customErrorMsg` **any**
268+
- `customErrorMsg` **any?**
269269

270270
### expectTrue
271271

272272
#### Parameters
273273

274274
- `targetData` **any**
275-
- `customErrorMsg` **any**
275+
- `customErrorMsg` **any?**

0 commit comments

Comments
 (0)