@@ -353,9 +353,9 @@ try {
353
353
threw = true ;
354
354
assert . ok ( e instanceof TypeError , 'type' ) ;
355
355
}
356
- assert . equal ( true , threw ,
357
- 'a.throws with an explicit error is eating extra errors' ,
358
- a . AssertionError ) ;
356
+ assert . strictEqual ( true , threw ,
357
+ 'a.throws with an explicit error is eating extra errors' ,
358
+ a . AssertionError ) ;
359
359
threw = false ;
360
360
361
361
// doesNotThrow should pass through all errors
@@ -365,8 +365,8 @@ try {
365
365
threw = true ;
366
366
assert . ok ( e instanceof TypeError ) ;
367
367
}
368
- assert . equal ( true , threw ,
369
- 'a.doesNotThrow with an explicit error is eating extra errors') ;
368
+ assert . strictEqual ( true , threw , 'a.doesNotThrow with an explicit error is ' +
369
+ ' eating extra errors') ;
370
370
371
371
// key difference is that throwing our correct error makes an assertion error
372
372
try {
@@ -375,8 +375,8 @@ try {
375
375
threw = true ;
376
376
assert . ok ( e instanceof a . AssertionError ) ;
377
377
}
378
- assert . equal ( true , threw ,
379
- 'a.doesNotThrow is not catching type matching errors' ) ;
378
+ assert . strictEqual ( true , threw ,
379
+ 'a.doesNotThrow is not catching type matching errors' ) ;
380
380
381
381
assert . throws ( function ( ) { assert . ifError ( new Error ( 'test error' ) ) ; } ) ;
382
382
assert . doesNotThrow ( function ( ) { assert . ifError ( null ) ; } ) ;
@@ -481,10 +481,10 @@ circular.x = circular;
481
481
482
482
function testAssertionMessage ( actual , expected ) {
483
483
try {
484
- assert . equal ( actual , '' ) ;
484
+ assert . strictEqual ( actual , '' ) ;
485
485
} catch ( e ) {
486
- assert . equal ( e . toString ( ) ,
487
- [ 'AssertionError:' , expected , '==' , '\'\'' ] . join ( ' ' ) ) ;
486
+ assert . strictEqual ( e . toString ( ) ,
487
+ [ 'AssertionError:' , expected , '= ==' , '\'\'' ] . join ( ' ' ) ) ;
488
488
assert . ok ( e . generatedMessage , 'Message not marked as generated' ) ;
489
489
}
490
490
}
@@ -519,24 +519,24 @@ try {
519
519
} ) ;
520
520
} catch ( e ) {
521
521
threw = true ;
522
- assert . equal ( e . message , 'Missing expected exception..' ) ;
522
+ assert . strictEqual ( e . message , 'Missing expected exception..' ) ;
523
523
}
524
524
assert . ok ( threw ) ;
525
525
526
526
// #5292
527
527
try {
528
- assert . equal ( 1 , 2 ) ;
528
+ assert . strictEqual ( 1 , 2 ) ;
529
529
} catch ( e ) {
530
- assert . equal ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: 1 == 2' ) ;
530
+ assert . strictEqual ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: 1 = == 2' ) ;
531
531
assert . ok ( e . generatedMessage , 'Message not marked as generated' ) ;
532
532
}
533
533
534
534
try {
535
- assert . equal ( 1 , 2 , 'oh no' ) ;
535
+ assert . strictEqual ( 1 , 2 , 'oh no' ) ;
536
536
} catch ( e ) {
537
- assert . equal ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: oh no' ) ;
538
- assert . equal ( e . generatedMessage , false ,
539
- 'Message incorrectly marked as generated' ) ;
537
+ assert . strictEqual ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: oh no' ) ;
538
+ assert . strictEqual ( e . generatedMessage , false ,
539
+ 'Message incorrectly marked as generated' ) ;
540
540
}
541
541
542
542
// Verify that throws() and doesNotThrow() throw on non-function block
@@ -547,8 +547,8 @@ function testBlockTypeError(method, block) {
547
547
method ( block ) ;
548
548
threw = false ;
549
549
} catch ( e ) {
550
- assert . equal ( e . toString ( ) ,
551
- 'TypeError: "block" argument must be a function' ) ;
550
+ assert . strictEqual ( e . toString ( ) ,
551
+ 'TypeError: "block" argument must be a function' ) ;
552
552
}
553
553
554
554
assert . ok ( threw ) ;
0 commit comments