Skip to content

feat: first use the third-party API for resolving usernames to UUID #65

feat: first use the third-party API for resolving usernames to UUID

feat: first use the third-party API for resolving usernames to UUID #65

Triggered via push December 15, 2025 16:06
Status Failure
Total duration 1m 56s
Artifacts

tests.yml

on: push
Tests + SonarCloud
1m 51s
Tests + SonarCloud
Fit to window
Zoom out
Zoom in

Annotations

10 errors
[unit] tests/unit/minecraft/profile/MinecraftProfileService.test.ts > #provideProfileByUsername > On Mojang API troubles (username->profile) an error is thrown: tests/unit/minecraft/profile/MinecraftProfileService.test.ts#L302
AssertionError: expected 'Not implemented' to be 'Connection timed out or something' // Object.is equality Expected: "Connection timed out or something" Received: "Not implemented" ❯ tests/unit/minecraft/profile/MinecraftProfileService.test.ts:302:43
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throws an exception on unexpected response status code of 500: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L93
AssertionError: expected [Function] to throw error including 'Failed to get UUID for username \'Spr…' but got 'Failed to get UUID for username \'Spr…' Expected: "Failed to get UUID for username 'SpraxDev' from mcproxy.dev (Expected status 200): {status=500, body=some unexpected response}" Received: "Failed to get UUID for username 'SpraxDev' from crafthead.net (Expected status 200 or 404): {status=500, body=some unexpected response}" ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:93:5
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throws an exception on unexpected response status code of 404: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L93
AssertionError: promise resolved "null" instead of rejecting - Expected: Error { "message": "rejected promise", } + Received: null ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:93:85
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throws an exception on unexpected response status code of 204: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L93
AssertionError: expected [Function] to throw error including 'Failed to get UUID for username \'Spr…' but got 'Failed to get UUID for username \'Spr…' Expected: "Failed to get UUID for username 'SpraxDev' from mcproxy.dev (Expected status 200): {status=204, body=some unexpected response}" Received: "Failed to get UUID for username 'SpraxDev' from crafthead.net (Expected status 200 or 404): {status=204, body=some unexpected response}" ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:93:5
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throws an exception on error response: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L83
AssertionError: expected [Function] to throw error including 'Failed to get UUID for username \'Spr…' but got 'Failed to get UUID for username \'Spr…' Expected: "Failed to get UUID for username 'SpraxDev' from mcproxy.dev (Expected status 200): {status=400, body={"ok":false,"data":{"error":"Invalid name"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":1}}}" Received: "Failed to get UUID for username 'SpraxDev' from crafthead.net (Expected status 200 or 404): {status=400, body={"ok":false,"data":{"error":"Invalid name"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":1}}}" ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:83:5
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Returns null when API response with 'Not Found' status in the body: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L75
AssertionError: promise rejected "Error: Failed to get UUID for username 'S…" instead of resolving ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:75:91 Caused by: Error: Failed to get UUID for username 'SpraxDev_' from crafthead.net (Expected id and name to be of type string): {body={"ok":false,"status":404,"data":{"path":"/minecraft/profile/lookup/name/SpraxDev_","errorMessage":"Couldn't find any profile with name SpraxDev_"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":900}}} ❯ ThirdPartyMinecraftApiClient.fetchUuidForUsernameFromCraftHeadNet src/minecraft/ThirdPartyMinecraftApiClient.ts:72:13
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throw when the UUID from the third-party API does not match the profile from the first-party API: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L64
AssertionError: expected [Function] to throw error including 'Failed to get UUID for username \'a-d…' but got 'Failed to get UUID for username \'a-d…' Expected: "Failed to get UUID for username 'a-different-name' from mcproxy.dev (Profile for returned uuid (955e4cf6411c40d1a1765bc8e03a8a9a) does not match the requested username)" Received: "Failed to get UUID for username 'a-different-name' from crafthead.net (Expected id and name to be of type string): {body={"ok":true,"status":200,"data":{"id":"955e4cf6411c40d1a1765bc8e03a8a9a","name":"a-different-name"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":900}}}" ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:64:5
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Throw when the UUID from the third-party API does not match the profile from the first-party API: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L64
AssertionError: expected [Function] to throw error including 'Failed to get UUID for username \'a-d…' but got 'Failed to get UUID for username \'a-d…' Expected: "Failed to get UUID for username 'a-different-name' from mcproxy.dev (Profile for returned uuid (955e4cf6411c40d1a1765bc8e03a8a9a) does not match the requested username)" Received: "Failed to get UUID for username 'a-different-name' from crafthead.net (Expected id and name to be of type string): {body={"ok":true,"status":200,"data":{"id":"955e4cf6411c40d1a1765bc8e03a8a9a","name":"a-different-name"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":900}}}" ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:64:5
[unit] tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts > #fetchUuidForUsername > Fetches the UUID from third-party and verifies the UUID's profile using first-party API: tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts#L49
AssertionError: promise rejected "Error: Failed to get UUID for username 'S…" instead of resolving ❯ tests/unit/minecraft/ThirdPartyMinecraftApiClient.test.ts:49:85 Caused by: Error: Failed to get UUID for username 'SpraxDev' from crafthead.net (Expected id and name to be of type string): {body={"ok":true,"status":200,"data":{"id":"955e4cf6411c40d1a1765bc8e03a8a9a","name":"SpraxDev"},"meta":{"cached":false,"fetched":1757678121995,"expires":1757679021995,"expiration":900}}} ❯ ThirdPartyMinecraftApiClient.fetchUuidForUsernameFromCraftHeadNet src/minecraft/ThirdPartyMinecraftApiClient.ts:72:13