mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix: resizing etc
This commit is contained in:
parent
54bd25ff4a
commit
8755b9dfc0
3 changed files with 36 additions and 28 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { sameToolTrailGroup } from '../lib/text.js'
|
||||
import { fmtK, sameToolTrailGroup } from '../lib/text.js'
|
||||
|
||||
describe('sameToolTrailGroup', () => {
|
||||
it('matches bare check lines', () => {
|
||||
|
|
@ -18,3 +18,19 @@ describe('sameToolTrailGroup', () => {
|
|||
expect(sameToolTrailGroup('🔍 searching', '🔍 searching extra ✓')).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('fmtK', () => {
|
||||
it('keeps small numbers plain', () => {
|
||||
expect(fmtK(999)).toBe('999')
|
||||
})
|
||||
|
||||
it('formats thousands as K', () => {
|
||||
expect(fmtK(1000)).toBe('1K')
|
||||
expect(fmtK(1500)).toBe('1.5K')
|
||||
})
|
||||
|
||||
it('formats millions and billions', () => {
|
||||
expect(fmtK(1_000_000)).toBe('1M')
|
||||
expect(fmtK(1_000_000_000)).toBe('1B')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue