@@ -19,6 +19,7 @@ will be instances of the `AssertionError` class.
19
19
<!-- YAML
20
20
added: v0.1.21
21
21
-->
22
+
22
23
* ` options ` {Object}
23
24
* ` message ` {string} If provided, the error message is set to this value.
24
25
* ` actual ` {any} The ` actual ` property on the error instance.
@@ -145,6 +146,7 @@ assert.deepEqual(/a/gi, new Date());
145
146
<!-- YAML
146
147
added: v0.5.9
147
148
-->
149
+
148
150
* ` value ` {any} The input that is checked for being truthy.
149
151
* ` message ` {string|Error}
150
152
@@ -174,6 +176,7 @@ changes:
174
176
pr-url: https://github.com/nodejs/node/pull/5910
175
177
description: Handle non-`Uint8Array` typed arrays correctly.
176
178
-->
179
+
177
180
* ` actual ` {any}
178
181
* ` expected ` {any}
179
182
* ` message ` {string|Error}
@@ -291,6 +294,7 @@ changes:
291
294
pr-url: https://github.com/nodejs/node/pull/5910
292
295
description: Handle non-`Uint8Array` typed arrays correctly.
293
296
-->
297
+
294
298
* ` actual ` {any}
295
299
* ` expected ` {any}
296
300
* ` message ` {string|Error}
@@ -420,6 +424,7 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
420
424
<!-- YAML
421
425
added: v10.0.0
422
426
-->
427
+
423
428
* ` asyncFn ` {Function|Promise}
424
429
* ` error ` {RegExp|Function}
425
430
* ` message ` {string}
@@ -476,6 +481,7 @@ changes:
476
481
pr-url: https://github.com/nodejs/node/pull/3276
477
482
description: The `error` parameter can now be an arrow function.
478
483
-->
484
+
479
485
* ` fn ` {Function}
480
486
* ` error ` {RegExp|Function}
481
487
* ` message ` {string}
@@ -544,6 +550,7 @@ assert.doesNotThrow(
544
550
<!-- YAML
545
551
added: v0.1.21
546
552
-->
553
+
547
554
* ` actual ` {any}
548
555
* ` expected ` {any}
549
556
* ` message ` {string|Error}
@@ -583,6 +590,7 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
583
590
<!-- YAML
584
591
added: v0.1.21
585
592
-->
593
+
586
594
* ` message ` {string|Error} ** Default:** ` 'Failed' `
587
595
588
596
Throws an ` AssertionError ` with the provided error message or a default error
@@ -614,6 +622,7 @@ changes:
614
622
description: Calling `assert.fail()` with more than one argument is
615
623
deprecated and emits a warning.
616
624
-->
625
+
617
626
* ` actual ` {any}
618
627
* ` expected ` {any}
619
628
* ` message ` {string|Error}
@@ -680,6 +689,7 @@ changes:
680
689
description: Value may now only be `undefined` or `null`. Before all falsy
681
690
values were handled the same as `null` and did not throw.
682
691
-->
692
+
683
693
* ` value ` {any}
684
694
685
695
Throws ` value ` if ` value ` is not ` undefined ` or ` null ` . This is useful when
@@ -733,6 +743,7 @@ changes:
733
743
pr-url: https://github.com/nodejs/node/pull/5910
734
744
description: Handle non-`Uint8Array` typed arrays correctly.
735
745
-->
746
+
736
747
* ` actual ` {any}
737
748
* ` expected ` {any}
738
749
* ` message ` {string|Error}
@@ -814,6 +825,7 @@ changes:
814
825
pr-url: https://github.com/nodejs/node/pull/5910
815
826
description: Handle non-`Uint8Array` typed arrays correctly.
816
827
-->
828
+
817
829
* ` actual ` {any}
818
830
* ` expected ` {any}
819
831
* ` message ` {string|Error}
@@ -837,6 +849,7 @@ instead of the `AssertionError`.
837
849
<!-- YAML
838
850
added: v0.1.21
839
851
-->
852
+
840
853
* ` actual ` {any}
841
854
* ` expected ` {any}
842
855
* ` message ` {string|Error}
@@ -879,6 +892,7 @@ changes:
879
892
pr-url: https://github.com/nodejs/node/pull/17003
880
893
description: Used comparison changed from Strict Equality to `Object.is()`
881
894
-->
895
+
882
896
* ` actual ` {any}
883
897
* ` expected ` {any}
884
898
* ` message ` {string|Error}
@@ -916,6 +930,7 @@ changes:
916
930
description: The `assert.ok()` (no arguments) will now use a predefined
917
931
error message.
918
932
-->
933
+
919
934
* ` value ` {any}
920
935
* ` message ` {string|Error}
921
936
@@ -978,6 +993,7 @@ assert(0);
978
993
<!-- YAML
979
994
added: v10.0.0
980
995
-->
996
+
981
997
* ` asyncFn ` {Function|Promise}
982
998
* ` error ` {RegExp|Function|Object|Error}
983
999
* ` message ` {string}
@@ -1040,6 +1056,7 @@ changes:
1040
1056
pr-url: https://github.com/nodejs/node/pull/17003
1041
1057
description: Used comparison changed from Strict Equality to `Object.is()`
1042
1058
-->
1059
+
1043
1060
* ` actual ` {any}
1044
1061
* ` expected ` {any}
1045
1062
* ` message ` {string|Error}
@@ -1096,6 +1113,7 @@ changes:
1096
1113
pr-url: https://github.com/nodejs/node/pull/3276
1097
1114
description: The `error` parameter can now be an arrow function.
1098
1115
-->
1116
+
1099
1117
* ` fn ` {Function}
1100
1118
* ` error ` {RegExp|Function|Object|Error}
1101
1119
* ` message ` {string}
0 commit comments