Skip to content

Commit b7e78c7

Browse files
style(test): reflow pagination.test.ts to satisfy prettier format:check gate
Pure mechanical prettier reflow of two vi.fn(async () => ({...})) callbacks in test/pagination.test.ts. No logic change — only line wrapping to satisfy the format:check CI gate (npm run format:check). All other gates already pass. Coverage remains >=80% on all 4 metrics (lines/statements/functions/branches).
1 parent b0ac2ba commit b7e78c7

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

test/pagination.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ describe('paginate', () => {
1919
it('breaks out of loop when API returns empty items with non-null nextToken', async () => {
2020
// This is the bug from issue #35: API returns { items: [], nextToken: 'cursor' }
2121
// Without the fix, paginate() would loop forever requesting the same empty page.
22-
const fetchPage: FetchPage<string> = vi.fn(async (): Promise<Page<string>> => ({
23-
items: [],
24-
nextToken: 'cursor',
25-
}));
22+
const fetchPage: FetchPage<string> = vi.fn(
23+
async (): Promise<Page<string>> => ({
24+
items: [],
25+
nextToken: 'cursor',
26+
}),
27+
);
2628

2729
const result = await paginate(fetchPage);
2830

@@ -65,7 +67,9 @@ describe('paginate', () => {
6567
{ items: ['a'], nextToken: null },
6668
];
6769
let callIndex = 0;
68-
const fetchPage: FetchPage<string> = vi.fn(async (): Promise<Page<string>> => pages[callIndex++]!);
70+
const fetchPage: FetchPage<string> = vi.fn(
71+
async (): Promise<Page<string>> => pages[callIndex++]!,
72+
);
6973

7074
const result = await paginate(fetchPage);
7175

0 commit comments

Comments
 (0)