@@ -165,10 +165,10 @@ added: v0.1.21
165165changes:
166166 - version: v9.0.0
167167 pr-url: https://github.com/nodejs/node/pull/15001
168- description: Error names and messages are now properly compared
168+ description: The ` Error` names and messages are now properly compared
169169 - version: v8.0.0
170170 pr-url: https://github.com/nodejs/node/pull/12142
171- description: Set and Map content is also compared
171+ description: The ` Set` and ` Map` content is also compared
172172 - version: v6.4.0, v4.7.1
173173 pr-url: https://github.com/nodejs/node/pull/8002
174174 description: Typed array slices are handled correctly now.
@@ -208,7 +208,7 @@ the [`RegExp`][] object are not enumerable:
208208assert .deepEqual (/ a/ gi , new Date ());
209209```
210210
211- An exception is made for [ ` Map ` ] [ ] and [ ` Set ` ] [ ] . Maps and Sets have their
211+ An exception is made for [ ` Map ` ] [ ] and [ ` Set ` ] [ ] . ` Map ` s and ` Set ` s have their
212212contained items compared too, as expected.
213213
214214"Deep" equality means that the enumerable "own" properties of child objects
@@ -264,15 +264,15 @@ changes:
264264 description: Enumerable symbol properties are now compared.
265265 - version: v9.0.0
266266 pr-url: https://github.com/nodejs/node/pull/15036
267- description: NaN is now compared using the
267+ description: The ` NaN` is now compared using the
268268 [SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
269269 comparison.
270270 - version: v8.5.0
271271 pr-url: https://github.com/nodejs/node/pull/15001
272- description: Error names and messages are now properly compared
272+ description: The ` Error` names and messages are now properly compared
273273 - version: v8.0.0
274274 pr-url: https://github.com/nodejs/node/pull/12142
275- description: Set and Map content is also compared
275+ description: The ` Set` and ` Map` content is also compared
276276 - version: v6.4.0, v4.7.1
277277 pr-url: https://github.com/nodejs/node/pull/8002
278278 description: Typed array slices are handled correctly now.
@@ -303,8 +303,8 @@ are recursively evaluated also by the following rules.
303303 enumerable properties.
304304* Enumerable own [ ` Symbol ` ] [ ] properties are compared as well.
305305* [ Object wrappers] [ ] are compared both as objects and unwrapped values.
306- * Object properties are compared unordered.
307- * Map keys and Set items are compared unordered.
306+ * ` Object ` properties are compared unordered.
307+ * ` Map ` keys and ` Set ` items are compared unordered.
308308* Recursion stops when both sides differ or both sides encounter a circular
309309 reference.
310310* [ ` WeakMap ` ] [ ] and [ ` WeakSet ` ] [ ] comparison does not rely on their values. See
@@ -413,10 +413,10 @@ function and awaits the returned promise to complete. It will then check that
413413the promise is not rejected.
414414
415415If ` block ` is a function and it throws an error synchronously,
416- ` assert.doesNotReject() ` will return a rejected Promise with that error. If the
417- function does not return a promise, ` assert.doesNotReject() ` will return a
418- rejected Promise with an [ ` ERR_INVALID_RETURN_VALUE ` ] [ ] error. In both cases the
419- error handler is skipped.
416+ ` assert.doesNotReject() ` will return a rejected ` Promise ` with that error. If
417+ the function does not return a promise, ` assert.doesNotReject() ` will return a
418+ rejected ` Promise ` with an [ ` ERR_INVALID_RETURN_VALUE ` ] [ ] error. In both cases
419+ the error handler is skipped.
420420
421421Please note: Using ` assert.doesNotReject() ` is actually not useful because there
422422is little benefit by catching a rejection and then rejecting it again. Instead,
@@ -494,7 +494,7 @@ assert.doesNotThrow(
494494```
495495
496496However, the following will result in an ` AssertionError ` with the message
497- 'Got unwanted exception (TypeError) ..':
497+ 'Got unwanted exception. ..':
498498
499499<!-- eslint-disable no-restricted-syntax -->
500500``` js
@@ -519,7 +519,7 @@ assert.doesNotThrow(
519519 / Wrong value/ ,
520520 ' Whoops'
521521);
522- // Throws: AssertionError: Got unwanted exception (TypeError). Whoops
522+ // Throws: AssertionError: Got unwanted exception: Whoops
523523```
524524
525525## assert.equal(actual, expected[ , message] )
@@ -656,7 +656,7 @@ changes:
656656 - version: v10.0.0
657657 pr-url: https://github.com/nodejs/node/pull/18247
658658 description: Instead of throwing the original error it is now wrapped into
659- a AssertionError that contains the full stack trace.
659+ an ` AssertionError` that contains the full stack trace.
660660 - version: v10.0.0
661661 pr-url: https://github.com/nodejs/node/pull/18247
662662 description: Value may now only be `undefined` or `null`. Before any truthy
@@ -701,10 +701,10 @@ added: v0.1.21
701701changes:
702702 - version: v9.0.0
703703 pr-url: https://github.com/nodejs/node/pull/15001
704- description: Error names and messages are now properly compared
704+ description: The ` Error` names and messages are now properly compared
705705 - version: v8.0.0
706706 pr-url: https://github.com/nodejs/node/pull/12142
707- description: Set and Map content is also compared
707+ description: The ` Set` and ` Map` content is also compared
708708 - version: v6.4.0, v4.7.1
709709 pr-url: https://github.com/nodejs/node/pull/8002
710710 description: Typed array slices are handled correctly now.
@@ -774,18 +774,18 @@ added: v1.2.0
774774changes:
775775 - version: v9.0.0
776776 pr-url: https://github.com/nodejs/node/pull/15398
777- description: -0 and +0 are not considered equal anymore.
777+ description: The `-0` and `+0` are not considered equal anymore.
778778 - version: v9.0.0
779779 pr-url: https://github.com/nodejs/node/pull/15036
780- description: NaN is now compared using the
780+ description: The ` NaN` is now compared using the
781781 [SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
782782 comparison.
783783 - version: v9.0.0
784784 pr-url: https://github.com/nodejs/node/pull/15001
785- description: Error names and messages are now properly compared
785+ description: The ` Error` names and messages are now properly compared
786786 - version: v8.0.0
787787 pr-url: https://github.com/nodejs/node/pull/12142
788- description: Set and Map content is also compared
788+ description: The ` Set` and ` Map` content is also compared
789789 - version: v6.4.0, v4.7.1
790790 pr-url: https://github.com/nodejs/node/pull/8002
791791 description: Typed array slices are handled correctly now.
@@ -893,7 +893,8 @@ added: v0.1.21
893893changes:
894894 - version: v10.0.0
895895 pr-url: https://github.com/nodejs/node/pull/18319
896- description: assert.ok() (no arguments) will now use a predefined error msg.
896+ description: The `assert.ok()` (no arguments) will now use a predefined
897+ error message.
897898-->
898899* ` value ` {any}
899900* ` message ` {any}
@@ -907,7 +908,7 @@ parameter is `undefined`, a default error message is assigned. If the `message`
907908parameter is an instance of an [ ` Error ` ] [ ] then it will be thrown instead of the
908909` AssertionError ` .
909910If no arguments are passed in at all ` message ` will be set to the string:
910- " No value argument passed to assert.ok" .
911+ `` ' No value argument passed to ` assert.ok()`' `` .
911912
912913Be aware that in the ` repl ` the error message will be different to the one
913914thrown in a file! See below for further details.
@@ -966,9 +967,9 @@ function and awaits the returned promise to complete. It will then check that
966967the promise is rejected.
967968
968969If ` block ` is a function and it throws an error synchronously,
969- ` assert.rejects() ` will return a rejected Promise with that error. If the
970+ ` assert.rejects() ` will return a rejected ` Promise ` with that error. If the
970971function does not return a promise, ` assert.rejects() ` will return a rejected
971- Promise with an [ ` ERR_INVALID_RETURN_VALUE ` ] [ ] error. In both cases the error
972+ ` Promise ` with an [ ` ERR_INVALID_RETURN_VALUE ` ] [ ] error. In both cases the error
972973handler is skipped.
973974
974975Besides the async nature to await the completion behaves identically to
0 commit comments