File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -358,11 +358,14 @@ test('functions', function (t) {
358
358
var genFnStar = Function ( 'return function* () {};' ) ( ) ;
359
359
var genFnSpaceStar = Function ( 'return function *() {};' ) ( ) ;
360
360
var genNoSpaces = Function ( 'return function*(){};' ) ( ) ;
361
- st . equal (
362
- 'second argument is a Generator; first is not' ,
363
- isEqualWhy ( fnNoSpace , genNoSpaces ) ,
364
- 'generator and fn that are otherwise identical are not equal'
365
- ) ;
361
+ var reasonsMap = {
362
+ 'second argument is a Generator; first is not' : true ,
363
+ 'toStringTag is not the same: [object Function] !== [object GeneratorFunction]' : true
364
+ } ;
365
+ var reasons = objectEntries ( reasonsMap ) ;
366
+ var actual = isEqualWhy ( fnNoSpace , genNoSpaces ) ;
367
+ reasonsMap [ actual ] = true ;
368
+ st . deepEqual ( objectEntries ( reasonsMap ) , reasons , 'generator and fn that are otherwise identical are not equal' ) ;
366
369
367
370
var generators = [ genFnStar , genFnSpaceStar , genNoSpaces ] ;
368
371
forEach ( generators , function ( generator ) {
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ module.exports = function whyNotEqual(value, other) {
83
83
}
84
84
85
85
var valToStr = toStr . call ( value ) ;
86
- var otherToStr = toStr . call ( value ) ;
86
+ var otherToStr = toStr . call ( other ) ;
87
87
if ( valToStr !== otherToStr ) {
88
88
return 'toStringTag is not the same: ' + valToStr + ' !== ' + otherToStr ;
89
89
}
You can’t perform that action at this time.
0 commit comments