Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
22 lines
740 B
JavaScript
22 lines
740 B
JavaScript
import { describe, expect, it } from 'vitest'
|
|
import { BoundedLiveFreezeHistory } from './live-freeze-bounded-history.mjs'
|
|
|
|
describe('BoundedLiveFreezeHistory', () => {
|
|
it('retains the newest entries in insertion order and counts the full run', () => {
|
|
const history = new BoundedLiveFreezeHistory(3)
|
|
|
|
for (let value = 1; value <= 7; value += 1) {
|
|
history.add(value)
|
|
}
|
|
|
|
expect(history.values()).toEqual([5, 6, 7])
|
|
expect(history.retainedCount).toBe(3)
|
|
expect(history.totalCount).toBe(7)
|
|
})
|
|
|
|
it('rejects invalid retention limits', () => {
|
|
expect(() => new BoundedLiveFreezeHistory(0)).toThrow('positive integer')
|
|
expect(() => new BoundedLiveFreezeHistory(1.5)).toThrow('positive integer')
|
|
})
|
|
})
|