Skip to content

Commit f4023c1

Browse files
committed
Update api.test.ts
1 parent 78842d6 commit f4023c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/api.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe("HyperliquidAPI Read APIs", () => {
199199

200200
test("filterLeaderboard returns correct results", async () => {
201201
const leaderboard: LeaderboardResponse = await api.leaderboard.getLeaderboard();
202-
const filtered = api.leaderboard.filterLeaderboard(leaderboard, {
202+
const filtered: LeaderboardEntry[] = await api.leaderboard.filterLeaderboard(leaderboard, {
203203
timeWindow: 'month',
204204
minAccountValue: 10000,
205205
minVolume: 1000000,
@@ -208,7 +208,7 @@ describe("HyperliquidAPI Read APIs", () => {
208208
maxAccounts: 10
209209
});
210210
expect(Array.isArray(filtered)).toBe(true);
211-
expect(filtered.length).toBeLessThanOrEqual(10);
211+
expect(filtered.length).toBeGreaterThan(0);
212212
filtered.forEach((entry: LeaderboardEntry) => {
213213
const monthPerformance = entry.windowPerformances.find(([window]) => window === 'month')?.[1];
214214
expect(parseFloat(entry.accountValue)).toBeGreaterThanOrEqual(10000);

0 commit comments

Comments
 (0)