mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
style: Format execution time as minutes, seconds (#2707)
This commit is contained in:
parent
f7ad9a7e47
commit
23e3c7d6ec
2 changed files with 16 additions and 3 deletions
|
|
@ -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', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue