From 52282618bdce9b2d3b43340fdccaf973a0394309 Mon Sep 17 00:00:00 2001 From: Tasnim Kabir Sadik Date: Sat, 9 May 2026 18:06:02 +0600 Subject: [PATCH] Delete live-client.integration.test.ts --- .../live-client.integration.test.ts | 85 ------------------- 1 file changed, 85 deletions(-) delete mode 100644 tests/integration/live-client.integration.test.ts diff --git a/tests/integration/live-client.integration.test.ts b/tests/integration/live-client.integration.test.ts deleted file mode 100644 index 9748ac9..0000000 --- a/tests/integration/live-client.integration.test.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { beforeAll, describe, expect, it } from "vitest"; - -import { WrennClient } from "../../src/client.js"; -import { DEFAULT_BASE_URL } from "../../src/config.js"; - -const baseUrl = process.env.WRENN_BASE_URL ?? DEFAULT_BASE_URL; -const apiKey = process.env.WRENN_API_KEY; -const testEmail = process.env.WRENN_TEST_EMAIL; -const testPassword = process.env.WRENN_TEST_PASS; - -const describeWithApiKey = apiKey ? describe : describe.skip; -const describeWithLogin = testEmail && testPassword ? describe : describe.skip; - -describeWithApiKey("WrennClient live API key integration", () => { - const client = new WrennClient({ apiKey, baseUrl }); - - it("lists capsules from the real Wrenn API", async () => { - const capsules = await client.capsules.list(); - - expect(Array.isArray(capsules)).toBe(true); - }); - - it("lists snapshot templates from the real Wrenn API", async () => { - const snapshots = await client.snapshots.list(); - - expect(Array.isArray(snapshots)).toBe(true); - }); - - it("gets capsule stats from the real Wrenn API", async () => { - const stats = await client.capsules.stats({ range: "1h" }); - - expect(stats).toBeTypeOf("object"); - }); - - it("gets capsule usage from the real Wrenn API", async () => { - const usage = await client.capsules.usage(); - - expect(usage).toBeTypeOf("object"); - }); -}); - -describeWithLogin("WrennClient live login integration", () => { - let client: WrennClient; - - beforeAll(async () => { - const authClient = new WrennClient({ baseUrl }); - const auth = await authClient.auth.login({ - email: testEmail as string, - password: testPassword as string, - }); - - expect(auth.token).toBeTypeOf("string"); - client = new WrennClient({ baseUrl, token: auth.token }); - }); - - it("gets the current account profile from the real Wrenn API", async () => { - const me = await client.account.getMe(); - - expect(me).toBeTypeOf("object"); - }); - - it("lists teams from the real Wrenn API", async () => { - const teams = await client.teams.list(); - - expect(Array.isArray(teams)).toBe(true); - }); - - it("lists API keys from the real Wrenn API", async () => { - const keys = await client.apiKeys.list(); - - expect(Array.isArray(keys)).toBe(true); - }); - - it("lists notification channels from the real Wrenn API", async () => { - const channels = await client.channels.list(); - - expect(Array.isArray(channels)).toBe(true); - }); - - it("lists hosts from the real Wrenn API", async () => { - const hosts = await client.hosts.list(); - - expect(Array.isArray(hosts)).toBe(true); - }); -});