@@ -9,6 +9,8 @@ test invariants.
9
9
<!-- YAML
10
10
added: v0.5.9
11
11
-->
12
+ * ` value ` {any}
13
+ * ` message ` {any}
12
14
13
15
An alias of [ ` assert.ok() ` ] [ ] .
14
16
@@ -41,6 +43,9 @@ changes:
41
43
pr-url: https://github.com/nodejs/node/pull/5910
42
44
description: Handle non-`Uint8Array` typed arrays correctly.
43
45
-->
46
+ * ` actual ` {any}
47
+ * ` expected ` {any}
48
+ * ` message ` {any}
44
49
45
50
Tests for deep equality between the ` actual ` and ` expected ` parameters.
46
51
Primitive values are compared with the equal comparison operator ( ` == ` ).
@@ -112,6 +117,9 @@ changes:
112
117
pr-url: https://github.com/nodejs/node/pull/5910
113
118
description: Handle non-`Uint8Array` typed arrays correctly.
114
119
-->
120
+ * ` actual ` {any}
121
+ * ` expected ` {any}
122
+ * ` message ` {any}
115
123
116
124
Generally identical to ` assert.deepEqual() ` with two exceptions. First,
117
125
primitive values are compared using the strict equality operator ( ` === ` ).
@@ -143,6 +151,9 @@ changes:
143
151
pr-url: https://github.com/nodejs/node/pull/3276
144
152
description: The `error` parameter can now be an arrow function.
145
153
-->
154
+ * ` block ` {Function}
155
+ * ` error ` {RegExp|Function}
156
+ * ` message ` {any}
146
157
147
158
Asserts that the function ` block ` does not throw an error. See
148
159
[ ` assert.throws() ` ] [ ] for more details.
@@ -198,6 +209,9 @@ assert.doesNotThrow(
198
209
<!-- YAML
199
210
added: v0.1.21
200
211
-->
212
+ * ` actual ` {any}
213
+ * ` expected ` {any}
214
+ * ` message ` {any}
201
215
202
216
Tests shallow, coercive equality between the ` actual ` and ` expected ` parameters
203
217
using the equal comparison operator ( ` == ` ).
@@ -224,6 +238,10 @@ parameter is undefined, a default error message is assigned.
224
238
<!-- YAML
225
239
added: v0.1.21
226
240
-->
241
+ * ` actual ` {any}
242
+ * ` expected ` {any}
243
+ * ` message ` {any}
244
+ * ` operator ` {String}
227
245
228
246
Throws an ` AssertionError ` . If ` message ` is falsy, the error message is set as
229
247
the values of ` actual ` and ` expected ` separated by the provided ` operator ` .
@@ -243,6 +261,7 @@ assert.fail(1, 2, 'whoops', '>');
243
261
<!-- YAML
244
262
added: v0.1.97
245
263
-->
264
+ * ` value ` {any}
246
265
247
266
Throws ` value ` if ` value ` is truthy. This is useful when testing the ` error `
248
267
argument in callbacks.
@@ -264,6 +283,9 @@ assert.ifError(new Error());
264
283
<!-- YAML
265
284
added: v0.1.21
266
285
-->
286
+ * ` actual ` {any}
287
+ * ` expected ` {any}
288
+ * ` message ` {any}
267
289
268
290
Tests for any deep inequality. Opposite of [ ` assert.deepEqual() ` ] [ ] .
269
291
@@ -308,6 +330,9 @@ parameter is undefined, a default error message is assigned.
308
330
<!-- YAML
309
331
added: v1.2.0
310
332
-->
333
+ * ` actual ` {any}
334
+ * ` expected ` {any}
335
+ * ` message ` {any}
311
336
312
337
Tests for deep strict inequality. Opposite of [ ` assert.deepStrictEqual() ` ] [ ] .
313
338
@@ -329,6 +354,9 @@ the `message` parameter is undefined, a default error message is assigned.
329
354
<!-- YAML
330
355
added: v0.1.21
331
356
-->
357
+ * ` actual ` {any}
358
+ * ` expected ` {any}
359
+ * ` message ` {any}
332
360
333
361
Tests shallow, coercive inequality with the not equal comparison operator
334
362
( ` != ` ).
@@ -354,6 +382,9 @@ parameter is undefined, a default error message is assigned.
354
382
<!-- YAML
355
383
added: v0.1.21
356
384
-->
385
+ * ` actual ` {any}
386
+ * ` expected ` {any}
387
+ * ` message ` {any}
357
388
358
389
Tests strict inequality as determined by the strict not equal operator
359
390
( ` !== ` ).
@@ -379,6 +410,8 @@ If the values are strictly equal, an `AssertionError` is thrown with a
379
410
<!-- YAML
380
411
added: v0.1.21
381
412
-->
413
+ * ` value ` {any}
414
+ * ` message ` {any}
382
415
383
416
Tests if ` value ` is truthy. It is equivalent to
384
417
` assert.equal(!!value, true, message) ` .
@@ -406,6 +439,9 @@ assert.ok(false, 'it\'s false');
406
439
<!-- YAML
407
440
added: v0.1.21
408
441
-->
442
+ * ` actual ` {any}
443
+ * ` expected ` {any}
444
+ * ` message ` {any}
409
445
410
446
Tests strict equality as determined by the strict equality operator ( ` === ` ).
411
447
@@ -434,6 +470,9 @@ changes:
434
470
pr-url: https://github.com/nodejs/node/pull/3276
435
471
description: The `error` parameter can now be an arrow function.
436
472
-->
473
+ * ` block ` {Function}
474
+ * ` error ` {RegExp|Function}
475
+ * ` message ` {any}
437
476
438
477
Expects the function ` block ` to throw an error.
439
478
0 commit comments