Skip to content

Commit

Permalink
Add status test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDrone7 committed Jun 30, 2024
1 parent 6b52a86 commit e2982ba
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/shieldbow/tests/status.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { PlatformData, Client } from '../dist';
import { config } from 'dotenv';

config();

describe('API: clash-v1', () => {
const client = new Client(process.env.RIOT_API_KEY!);

let platform: PlatformData;

beforeAll(async () => {
await client.initialize(globalThis.clientConfig);
try {
platform = await client.fetchStatus('euw');
} catch (e) {
client.logger?.error(`${e}`);
}
});

it('should be able to fetch platform data', () => {
expect(platform).toBeDefined();
expect(platform.id).toBe('EUW1');
expect(platform.name).toBe('EU West');
expect(platform.locales.length).toBeGreaterThan(0);
});
});

0 comments on commit e2982ba

Please sign in to comment.