File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 66
77The ` assert ` module provides a set of assertion functions for verifying
88invariants. The module provides a recommended [ ` strict ` mode] [ ] and a more
9- lenient ` legacy ` mode.
9+ lenient legacy mode.
1010
1111For more information about the used equality comparisons see
1212[ MDN's guide on equality comparisons and sameness] [ mdn-equality-guide ] .
@@ -80,14 +80,14 @@ changes:
8080 description: Added strict mode to the assert module.
8181-->
8282
83- When using the ` strict ` mode, any ` assert ` function will use the equality used
84- in the strict function mode. So [ ` assert.deepEqual() ` ] [ ] will, for example,
85- work the same as [ ` assert.deepStrictEqual() ` ] [ ] .
83+ In ` strict ` mode, ` assert ` functions use the comparison in the corresponding
84+ strict functions. For example, [ ` assert.deepEqual() ` ] [ ] will behave like
85+ [ ` assert.deepStrictEqual() ` ] [ ] .
8686
87- On top of that , error messages which involve objects produce an error diff
88- instead of displaying both objects. That is not the case for the legacy mode .
87+ In ` strict ` mode , error messages for objects display a diff. In legacy mode,
88+ error messages for objects display the objects, often truncated .
8989
90- It can be accessed using :
90+ To use ` strict ` mode :
9191
9292``` js
9393const assert = require (' assert' ).strict ;
You can’t perform that action at this time.
0 commit comments