Skip to content

Commit c5c5614

Browse files
committed
fix: add loop to frame test
Signed-off-by: Alexander Mangel <[email protected]>
1 parent 60396d7 commit c5c5614

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/prompts/test/__snapshots__/spinner.test.ts.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ exports[`spinner (isCI = false) > indicator customization > custom frames 1`] =
2424
"│
2525
",
2626
"🐴 ",
27+
"",
28+
"",
29+
"🦋 ",
30+
"",
31+
"",
32+
"🐙 ",
33+
"",
34+
"",
35+
"🐶 ",
2736
]
2837
`;
2938

packages/prompts/test/spinner.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ describe.each(['true', 'false'])('spinner (isCI = %s)', (isCI) => {
155155

156156
result.start();
157157

158-
vi.advanceTimersByTime(80);
158+
// there are 4 frames
159+
for (let i = 0; i < 4; i++) {
160+
vi.advanceTimersByTime(80);
161+
}
159162

160163
expect(output.buffer).toMatchSnapshot();
161164
});

0 commit comments

Comments
 (0)