forked from Lilly-Protocol/lily-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaginated-list.test.ts
More file actions
35 lines (32 loc) · 999 Bytes
/
Copy pathpaginated-list.test.ts
File metadata and controls
35 lines (32 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
/**
* Bounty #62 — $40
* "Add paginated `WalletClient.list` and `PaymentClient.list`"
*/
describe('paginated list methods', () => {
it('WalletClient has a list method', () => {
const content = readFileSync(
resolve(process.cwd(), 'src/clients/wallet-client.ts'),
'utf8',
);
expect(content).toContain('list');
});
it('PaymentClient has a list method', () => {
const content = readFileSync(
resolve(process.cwd(), 'src/clients/payment-client.ts'),
'utf8',
);
expect(content).toContain('list');
});
it('PaginationQuery type is defined in common models', () => {
const content = readFileSync(
resolve(process.cwd(), 'src/models/common.ts'),
'utf8',
);
expect(content).toContain('PaginationQuery');
expect(content).toContain('limit');
expect(content).toContain('cursor');
});
});