import assert from 'node:assert/strict'
import test from 'node:test'
import { emptyVersion, normalizeVersion } from './version-shape.ts'
test('normalizes a published commit into About fields', () => {
const version = normalizeVersion({
sha: '836fc4daddanintentionalfirstpaint',
message: 'Add an intentional first-paint loading state for Lineage.\n\nMore detail.',
committedAt: '2026-08-29T15:03:00Z',
publishedAt: '2026-08-29T15:10:00Z',
})
assert.equal(version.shortSha, '836fc4d')
assert.equal(version.message, 'Add an intentional first-paint loading state for Lineage.')
assert.equal(emptyVersion().sha, '')
})