summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/LoadingIndicator.test.tsx
diff options
context:
space:
mode:
authorAyesha Shafique <[email protected]>2025-07-08 11:14:42 +0500
committerGitHub <[email protected]>2025-07-08 06:14:42 +0000
commit23e3c7d6ec714aeb80f78f7c551fda0929e6a9e8 (patch)
tree2e90e620a8ff250024896f3ac99bd00c5455bf63 /packages/cli/src/ui/components/LoadingIndicator.test.tsx
parentf7ad9a7e47426551b2f1d5a7f81e2f160b286dda (diff)
style: Format execution time as minutes, seconds (#2707)
Diffstat (limited to 'packages/cli/src/ui/components/LoadingIndicator.test.tsx')
-rw-r--r--packages/cli/src/ui/components/LoadingIndicator.test.tsx16
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/LoadingIndicator.test.tsx b/packages/cli/src/ui/components/LoadingIndicator.test.tsx
index ba161062..9e647208 100644
--- a/packages/cli/src/ui/components/LoadingIndicator.test.tsx
+++ b/packages/cli/src/ui/components/LoadingIndicator.test.tsx
@@ -97,13 +97,25 @@ describe('<LoadingIndicator />', () => {
it('should display the elapsedTime correctly when Responding', () => {
const props = {
currentLoadingPhrase: 'Working...',
- elapsedTime: 8,
+ elapsedTime: 60,
};
const { lastFrame } = renderWithContext(
<LoadingIndicator {...props} />,
StreamingState.Responding,
);
- expect(lastFrame()).toContain('(esc to cancel, 8s)');
+ expect(lastFrame()).toContain('(esc to cancel, 1m)');
+ });
+
+ it('should display the elapsedTime correctly in human-readable format', () => {
+ const props = {
+ currentLoadingPhrase: 'Working...',
+ elapsedTime: 125,
+ };
+ const { lastFrame } = renderWithContext(
+ <LoadingIndicator {...props} />,
+ StreamingState.Responding,
+ );
+ expect(lastFrame()).toContain('(esc to cancel, 2m 5s)');
});
it('should render rightContent when provided', () => {