src/history/index.test.ts
v0.3.0 · 666 B
import { describe, expect, it } from 'vitest';
import * as history from './index.js';
describe('history public API', () => {
it('exposes the documented entry points', () => {
for (const name of [
'fetchFillsByTime',
'fetchRecentFills',
'fetchTwapSliceFills',
'mergeFillsWithTwap',
'groupFillsByOrder',
'reconstructRoundTrips',
'fetchCandles',
'fetchUserFunding',
'fetchFundingHistory',
'quantizeWindow',
] as const) {
expect(typeof history[name]).toBe('function');
}
expect(history.USER_FILLS_PAGE_LIMIT).toBe(2000);
expect(history.CANDLE_INTERVALS.length).toBe(14);
});
});