@@ -574,7 +574,7 @@ test("enumerability", () => {
574
574
@computed
575
575
get b ( ) {
576
576
return this . a
577
- } // non-enumerable, on proto
577
+ } // non-enumerable, (and, ideally, on proto)
578
578
@action
579
579
m ( ) { } // non-enumerable, on proto
580
580
@action m2 = ( ) => { } // non-enumerable, on self
@@ -587,17 +587,15 @@ test("enumerability", () => {
587
587
let props = [ ]
588
588
for ( var key in a ) props . push ( key )
589
589
590
- expect ( ownProps ) . toEqual (
591
- [
592
- // should have a, not supported yet in babel...
593
- ]
594
- )
590
+ expect ( ownProps ) . toEqual ( [
591
+ // should have a, not supported yet in babel...
592
+ ] )
595
593
596
594
expect ( props ) . toEqual ( [ "a" , "a2" ] )
597
595
598
596
expect ( "a" in a ) . toBe ( true )
599
- expect ( a . hasOwnProperty ( "a" ) ) . toBe ( false ) // true would better..
600
- expect ( a . hasOwnProperty ( "b" ) ) . toBe ( false )
597
+ expect ( a . hasOwnProperty ( "a" ) ) . toBe ( false )
598
+ expect ( a . hasOwnProperty ( "b" ) ) . toBe ( false ) // true would be more consistent, see below
601
599
expect ( a . hasOwnProperty ( "m" ) ) . toBe ( false )
602
600
expect ( a . hasOwnProperty ( "m2" ) ) . toBe ( true )
603
601
@@ -624,7 +622,7 @@ test("enumerability", () => {
624
622
expect ( "a" in a ) . toBe ( true )
625
623
expect ( a . hasOwnProperty ( "a" ) ) . toBe ( true )
626
624
expect ( a . hasOwnProperty ( "a2" ) ) . toBe ( true )
627
- expect ( a . hasOwnProperty ( "b" ) ) . toBe ( false ) // true would also be ok-ish. see: #1398
625
+ expect ( a . hasOwnProperty ( "b" ) ) . toBe ( true ) // true would better.. but, #1777
628
626
expect ( a . hasOwnProperty ( "m" ) ) . toBe ( false )
629
627
expect ( a . hasOwnProperty ( "m2" ) ) . toBe ( true )
630
628
} )
@@ -636,7 +634,7 @@ test("enumerability - workaround", () => {
636
634
@computed
637
635
get b ( ) {
638
636
return this . a
639
- } // non-enumerable, on proto
637
+ } // non-enumerable, (and, ideally, on proto)
640
638
@action
641
639
m ( ) { } // non-enumerable, on proto
642
640
@action m2 = ( ) => { } // non-enumerable, on self
@@ -663,7 +661,7 @@ test("enumerability - workaround", () => {
663
661
expect ( "a" in a ) . toBe ( true )
664
662
expect ( a . hasOwnProperty ( "a" ) ) . toBe ( true )
665
663
expect ( a . hasOwnProperty ( "a2" ) ) . toBe ( true )
666
- expect ( a . hasOwnProperty ( "b" ) ) . toBe ( false ) // true would also be ok-ish. see: #1398
664
+ expect ( a . hasOwnProperty ( "b" ) ) . toBe ( true ) // ideally, false, but #1777
667
665
expect ( a . hasOwnProperty ( "m" ) ) . toBe ( false )
668
666
expect ( a . hasOwnProperty ( "m2" ) ) . toBe ( true )
669
667
} )
@@ -701,11 +699,9 @@ test("verify object assign (babel)", () => {
701
699
}
702
700
703
701
const todo = new Todo ( )
704
- expect ( Object . assign ( { } , todo ) ) . toEqual (
705
- {
706
- // Should be: title: "test"!
707
- }
708
- )
702
+ expect ( Object . assign ( { } , todo ) ) . toEqual ( {
703
+ // Should be: title: "test"!
704
+ } )
709
705
710
706
todo . title // lazy initialization :'(
711
707
0 commit comments