@@ -992,14 +992,14 @@ describe("createVersionedEntity", () => {
992992 if ( result . type === "ok" ) {
993993 // The root's migration function saw v1 children
994994 expect ( rootChildVersions ) . toEqual ( [ 1 , 1 ] )
995-
996- // Final result: parent is migrated but children are not (up didn't migrate them)
995+
996+ // Final result: parent is migrated, and children are also migrated by the schema's entityRefUptoVersion transform
997997 expect ( result . value . v ) . toBe ( 2 )
998998 expect ( result . value . name ) . toBe ( "root_v2" )
999- expect ( result . value . children [ 0 ] . v ) . toBe ( 1 )
1000- expect ( result . value . children [ 0 ] . name ) . toBe ( "child1 " )
1001- expect ( result . value . children [ 1 ] . v ) . toBe ( 1 )
1002- expect ( result . value . children [ 1 ] . name ) . toBe ( "child2 " )
999+ expect ( result . value . children [ 0 ] . v ) . toBe ( 2 )
1000+ expect ( result . value . children [ 0 ] . name ) . toBe ( "child1_v2 " )
1001+ expect ( result . value . children [ 1 ] . v ) . toBe ( 2 )
1002+ expect ( result . value . children [ 1 ] . name ) . toBe ( "child2_v2 " )
10031003 }
10041004 } )
10051005 } )
@@ -1088,12 +1088,12 @@ describe("createVersionedEntity", () => {
10881088 if ( result . type === "ok" ) {
10891089 // Parent still sees v1 child during migration (even without z.lazy)
10901090 expect ( childMigrationVersion ) . toBe ( 1 )
1091-
1092- // Final result: parent is migrated but child is not (up didn't migrate it)
1091+
1092+ // Final result: parent is migrated, and child is also migrated by the schema's entityRefUptoVersion transform
10931093 expect ( result . value . v ) . toBe ( 2 )
10941094 expect ( result . value . name ) . toBe ( "parent_parent_v2" )
1095- expect ( result . value . child . v ) . toBe ( 1 )
1096- expect ( result . value . child . name ) . toBe ( "child " )
1095+ expect ( result . value . child . v ) . toBe ( 2 )
1096+ expect ( result . value . child . name ) . toBe ( "child_child_v2 " )
10971097 }
10981098 } )
10991099 } )
0 commit comments