@@ -947,19 +947,25 @@ describe('MapsService', () => {
947947
948948 it ( 'returns [] if the id is the string undefined' , async ( ) => {
949949 await mapsRepo . save ( { ownerExternalId : undefined } )
950- const result = await mapsService . getMapsOfUser ( ' undefined' )
950+ const result = await mapsService . getMapsOfUser ( undefined as unknown as string )
951951 expect ( result ) . toEqual ( [ ] )
952952 } )
953953
954954 it ( 'returns [] if the id is the string null' , async ( ) => {
955955 await mapsRepo . save ( { ownerExternalId : null } )
956- const result = await mapsService . getMapsOfUser ( ' null' )
956+ const result = await mapsService . getMapsOfUser ( null as unknown as string )
957957 expect ( result ) . toEqual ( [ ] )
958958 } )
959959
960- it ( 'returns [] if the id is an empty array [] ' , async ( ) => {
960+ it ( 'returns [] if the id is an empty string ' , async ( ) => {
961961 await mapsRepo . save ( { ownerExternalId : undefined } )
962- const result = await mapsService . getMapsOfUser ( '[]' )
962+ const result = await mapsService . getMapsOfUser ( '' )
963+ expect ( result ) . toEqual ( [ ] )
964+ } )
965+
966+ it ( 'returns [] if the id is an empty array' , async ( ) => {
967+ await mapsRepo . save ( { ownerExternalId : undefined } )
968+ const result = await mapsService . getMapsOfUser ( [ ] as unknown as string )
963969 expect ( result ) . toEqual ( [ ] )
964970 } )
965971
0 commit comments