Something went wrong. Try again.
TypeScript client for accessing TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142import { getLacuna } from '../../__utils__/get-lacuna';import { expectMatchesApiSchema } from '../../__utils__/validate-schema';import { findBuilding } from '../../__utils__/find-building';import Lacuna from '../../lacuna';
let lacuna: Lacuna;let buildingId: number | undefined;
beforeAll(async () => { lacuna = await getLacuna(); const found = await findBuilding(lacuna, 'Development Ministry'); buildingId = found?.buildingId;});
test('view', async () => { if (buildingId === undefined) { console.warn('Skipping: no Development Ministry building on the fixture account'); return; }
const { result } = await lacuna.development.view({ building_id: buildingId });
expect(result?.building).toBeDefined(); expect(result?.building.name).toBe('Development Ministry'); expectMatchesApiSchema('development', 'view', result);});
test('getStatsForLevel', async () => { if (buildingId === undefined) { console.warn('Skipping: no Development Ministry building on the fixture account'); return; }
const { result } = await lacuna.development.getStatsForLevel({ building_id: buildingId, level: 1, });
expect(result?.building).toBeDefined(); expectMatchesApiSchema('development', 'get_stats_for_level', result);});