add server previews
This commit is contained in:
@ -24,6 +24,7 @@ test("ensureGetPlayerSkinPartSuccess", async () => {
|
||||
// Test each skin part
|
||||
for (const part in skinParts) {
|
||||
const partBuffer = await getPlayerSkinPart(part, player.uniqueId);
|
||||
|
||||
expect(partBuffer).toBeDefined();
|
||||
expect(partBuffer.byteLength).toBeGreaterThan(0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {getBlockedStatus, getServer, getServerIcon, ServerPlatform} from "../dist";
|
||||
import {getBlockedStatus, getServer, getServerIcon, getServerPreview, ServerPlatform} from "../dist";
|
||||
|
||||
test("ensureGetServerLookupSuccess", async () => {
|
||||
const server = await getServer(ServerPlatform.Java, "mc.hypixel.net");
|
||||
@ -9,6 +9,7 @@ test("ensureGetServerLookupSuccess", async () => {
|
||||
|
||||
test("ensureGetServerIconSuccess", async () => {
|
||||
const icon = await getServerIcon("mc.hypixel.net");
|
||||
|
||||
expect(icon).toBeDefined();
|
||||
expect(icon.byteLength).toBeGreaterThan(0); // The server has an icon
|
||||
});
|
||||
@ -19,3 +20,10 @@ test("ensureGetServerBlockedStatusSuccess", async () => {
|
||||
|
||||
expect(blocked).toBe(false); // The server is not blocked
|
||||
});
|
||||
|
||||
test("ensureGetServerPreviewSuccess", async () => {
|
||||
const preview = await getServerPreview(ServerPlatform.Java, "mc.hypixel.net");
|
||||
|
||||
expect(preview).toBeDefined();
|
||||
expect(preview.byteLength).toBeGreaterThan(0); // The server has a preview
|
||||
});
|
Reference in New Issue
Block a user