mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-12 19:00:01 -10:00
* feat(web-shell): improve composer and context usage presentation * fix(web-shell): address context presentation review feedback * test(web-shell): align brand fixtures with startup and layout * fix(web-shell): improve context readability and availability
12 lines
426 B
TypeScript
12 lines
426 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { formatContextTokens } from './formatTokenCount';
|
|
|
|
describe('formatContextTokens', () => {
|
|
it('renders k/M units with one decimal', () => {
|
|
expect(formatContextTokens(512)).toBe('512');
|
|
expect(formatContextTokens(47_851)).toBe('47.9k');
|
|
expect(formatContextTokens(1_000_000)).toBe('1.0M');
|
|
expect(formatContextTokens(1_234_567)).toBe('1.2M');
|
|
});
|
|
});
|