@@ -43,18 +43,18 @@ are evaluated also:
4343const assert = require (' assert' );
4444
4545const obj1 = {
46- a : {
47- b : 1
46+ a: {
47+ b: 1
4848 }
4949};
5050const obj2 = {
51- a : {
52- b : 2
51+ a: {
52+ b: 2
5353 }
5454};
5555const obj3 = {
56- a : {
57- b : 1
56+ a: {
57+ b: 1
5858 }
5959};
6060const obj4 = Object .create (obj1);
@@ -93,10 +93,10 @@ Second, object comparisons include a strict equality check of their prototypes.
9393``` js
9494const assert = require (' assert' );
9595
96- assert .deepEqual ({a : 1 }, {a : ' 1' });
96+ assert .deepEqual ({ a : 1 }, { a : ' 1' });
9797// OK, because 1 == '1'
9898
99- assert .deepStrictEqual ({a : 1 }, {a : ' 1' });
99+ assert .deepStrictEqual ({ a : 1 }, { a : ' 1' });
100100// AssertionError: { a: 1 } deepStrictEqual { a: '1' }
101101// because 1 !== '1' using strict equality
102102```
@@ -251,18 +251,18 @@ Tests for any deep inequality. Opposite of [`assert.deepEqual()`][].
251251const assert = require (' assert' );
252252
253253const obj1 = {
254- a : {
255- b : 1
254+ a: {
255+ b: 1
256256 }
257257};
258258const obj2 = {
259- a : {
260- b : 2
259+ a: {
260+ b: 2
261261 }
262262};
263263const obj3 = {
264- a : {
265- b : 1
264+ a: {
265+ b: 1
266266 }
267267};
268268const obj4 = Object .create (obj1);
@@ -297,10 +297,10 @@ Tests for deep strict inequality. Opposite of [`assert.deepStrictEqual()`][].
297297``` js
298298const assert = require (' assert' );
299299
300- assert .notDeepEqual ({a: 1 }, {a: ' 1' });
300+ assert .notDeepEqual ({a: 1 }, {a: ' 1' });
301301// AssertionError: { a: 1 } notDeepEqual { a: '1' }
302302
303- assert .notDeepStrictEqual ({a: 1 }, {a: ' 1' });
303+ assert .notDeepStrictEqual ({a: 1 }, {a: ' 1' });
304304// OK
305305```
306306
@@ -466,7 +466,7 @@ assert.throws(
466466 throw new Error (' Wrong value' );
467467 },
468468 function (err ) {
469- if ( (err instanceof Error ) && / value/ .test (err) ) {
469+ if ((err instanceof Error ) && / value/ .test (err)) {
470470 return true ;
471471 }
472472 },
@@ -478,6 +478,7 @@ Note that `error` can not be a string. If a string is provided as the second
478478argument, then ` error ` is assumed to be omitted and the string will be used for
479479` message ` instead. This can lead to easy-to-miss mistakes:
480480
481+ <!-- eslint-disable assert-throws-arguments -->
481482``` js
482483// THIS IS A MISTAKE! DO NOT DO THIS!
483484assert .throws (myFunction, ' missing foo' , ' did not throw with expected message' );
0 commit comments