- Recover the IndexedDB and in-memory document cache behind the storage domain - Add persistent outbox supersession, cache eviction, import validation, and naming helpers - Keep the substrate provider-neutral and cover its pure behavior Co-authored-by: Rob Coenen <753704+rcoenen@users.noreply.github.com>
13 lines
411 B
TypeScript
13 lines
411 B
TypeScript
import { describe, expect, test } from 'bun:test'
|
|
|
|
import { formatStorageBytes } from '@/app/storage/format-bytes'
|
|
|
|
describe('formatStorageBytes', () => {
|
|
test('formats common sizes', () => {
|
|
expect(formatStorageBytes(0)).toBe('0 B')
|
|
expect(formatStorageBytes(512)).toBe('512 B')
|
|
expect(formatStorageBytes(2048)).toBe('2 KB')
|
|
expect(formatStorageBytes(1024 * 1024 * 3)).toBe('3.0 MB')
|
|
})
|
|
})
|