Skip to content
← Public packages

@kody/mailroom

Offline-first PWA for your Kody mailbox: sent and received threads, copy-prompt for agents, no send.

src/version-shape.node.test.ts

15 lines · 609 B · TypeScript
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: '4234b2ae259540c9dff533007a05f73feecb46d2',
		message: 'Use the same suited Kody mark as the favicon\n\nMore detail.',
		committedAt: '2026-08-31T16:15:00Z',
		publishedAt: '2026-08-31T16:16:00Z',
	})
	assert.equal(version.shortSha, '4234b2a')
	assert.equal(version.message, 'Use the same suited Kody mark as the favicon')
	assert.equal(emptyVersion().sha, '')
})