@@ -253,7 +253,7 @@ describe('#provideProfileByUsername', () => {
253253 expect ( minecraftApiClient . fetchUuidForUsername ) . toHaveBeenCalledTimes ( 0 ) ;
254254 } ) ;
255255
256- test ( 'On Mojang API troubles (username->profile) the third -party API is used to determine the UUID' , async ( ) => {
256+ test ( 'On API troubles (username->profile) the first -party API is used to determine the UUID' , async ( ) => {
257257 const expectedProfile = {
258258 profile : EXISTING_MC_PROFILE_RESPONSE ,
259259 ageInSeconds : 0 ,
@@ -273,14 +273,14 @@ describe('#provideProfileByUsername', () => {
273273 expect ( profileCache . findByUsername ) . toHaveBeenCalledTimes ( 1 ) ;
274274 expect ( profileCache . findByUsername ) . toHaveBeenCalledWith ( EXISTING_MC_NAME ) ;
275275
276- expect ( minecraftApiClient . fetchUuidForUsername ) . toHaveBeenCalledTimes ( 1 ) ;
276+ expect ( minecraftApiClient . fetchUuidForUsername ) . toHaveBeenCalledTimes ( 0 ) ;
277277 expect ( minecraftApiClient . fetchProfileForUuid ) . toHaveBeenCalledTimes ( 1 ) ;
278278 expect ( thirdPartyMinecraftApiClient . fetchUuidForUsername ) . toHaveBeenCalledTimes ( 1 ) ;
279279 } ) ;
280280
281- test ( 'On Mojang API troubles (username->profile) an error is thrown' , async ( ) => {
281+ test ( 'On API troubles (username->profile) an error is thrown' , async ( ) => {
282282 profileCache . findByUsername . mockResolvedValue ( null ) ;
283- minecraftApiClient . fetchUuidForUsername . mockImplementation ( ( ) => {
283+ thirdPartyMinecraftApiClient . fetchUuidForUsername . mockImplementation ( ( ) => {
284284 throw new Error ( 'Connection timed out or something' ) ;
285285 } ) ;
286286
0 commit comments