@@ -333,9 +333,9 @@ try {
333
333
threw = true ;
334
334
assert . ok ( e instanceof TypeError , 'type' ) ;
335
335
}
336
- assert . equal ( true , threw ,
337
- 'a.throws with an explicit error is eating extra errors' ,
338
- a . AssertionError ) ;
336
+ assert . strictEqual ( true , threw ,
337
+ 'a.throws with an explicit error is eating extra errors' ,
338
+ a . AssertionError ) ;
339
339
threw = false ;
340
340
341
341
// doesNotThrow should pass through all errors
@@ -345,8 +345,8 @@ try {
345
345
threw = true ;
346
346
assert . ok ( e instanceof TypeError ) ;
347
347
}
348
- assert . equal ( true , threw ,
349
- 'a.doesNotThrow with an explicit error is eating extra errors') ;
348
+ assert . strictEqual ( true , threw , 'a.doesNotThrow with an explicit error is ' +
349
+ ' eating extra errors') ;
350
350
351
351
// key difference is that throwing our correct error makes an assertion error
352
352
try {
@@ -355,8 +355,8 @@ try {
355
355
threw = true ;
356
356
assert . ok ( e instanceof a . AssertionError ) ;
357
357
}
358
- assert . equal ( true , threw ,
359
- 'a.doesNotThrow is not catching type matching errors' ) ;
358
+ assert . strictEqual ( true , threw ,
359
+ 'a.doesNotThrow is not catching type matching errors' ) ;
360
360
361
361
assert . throws ( function ( ) { assert . ifError ( new Error ( 'test error' ) ) ; } ) ;
362
362
assert . doesNotThrow ( function ( ) { assert . ifError ( null ) ; } ) ;
@@ -461,10 +461,10 @@ circular.x = circular;
461
461
462
462
function testAssertionMessage ( actual , expected ) {
463
463
try {
464
- assert . equal ( actual , '' ) ;
464
+ assert . strictEqual ( actual , '' ) ;
465
465
} catch ( e ) {
466
- assert . equal ( e . toString ( ) ,
467
- [ 'AssertionError:' , expected , '==' , '\'\'' ] . join ( ' ' ) ) ;
466
+ assert . strictEqual ( e . toString ( ) ,
467
+ [ 'AssertionError:' , expected , '= ==' , '\'\'' ] . join ( ' ' ) ) ;
468
468
assert . ok ( e . generatedMessage , 'Message not marked as generated' ) ;
469
469
}
470
470
}
@@ -499,24 +499,24 @@ try {
499
499
} ) ;
500
500
} catch ( e ) {
501
501
threw = true ;
502
- assert . equal ( e . message , 'Missing expected exception..' ) ;
502
+ assert . strictEqual ( e . message , 'Missing expected exception..' ) ;
503
503
}
504
504
assert . ok ( threw ) ;
505
505
506
506
// #5292
507
507
try {
508
- assert . equal ( 1 , 2 ) ;
508
+ assert . strictEqual ( 1 , 2 ) ;
509
509
} catch ( e ) {
510
- assert . equal ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: 1 == 2' ) ;
510
+ assert . strictEqual ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: 1 = == 2' ) ;
511
511
assert . ok ( e . generatedMessage , 'Message not marked as generated' ) ;
512
512
}
513
513
514
514
try {
515
- assert . equal ( 1 , 2 , 'oh no' ) ;
515
+ assert . strictEqual ( 1 , 2 , 'oh no' ) ;
516
516
} catch ( e ) {
517
- assert . equal ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: oh no' ) ;
518
- assert . equal ( e . generatedMessage , false ,
519
- 'Message incorrectly marked as generated' ) ;
517
+ assert . strictEqual ( e . toString ( ) . split ( '\n' ) [ 0 ] , 'AssertionError: oh no' ) ;
518
+ assert . strictEqual ( e . generatedMessage , false ,
519
+ 'Message incorrectly marked as generated' ) ;
520
520
}
521
521
522
522
// Verify that throws() and doesNotThrow() throw on non-function block
@@ -527,8 +527,8 @@ function testBlockTypeError(method, block) {
527
527
method ( block ) ;
528
528
threw = false ;
529
529
} catch ( e ) {
530
- assert . equal ( e . toString ( ) ,
531
- 'TypeError: "block" argument must be a function' ) ;
530
+ assert . strictEqual ( e . toString ( ) ,
531
+ 'TypeError: "block" argument must be a function' ) ;
532
532
}
533
533
534
534
assert . ok ( threw ) ;
0 commit comments