import { describe, it } from 'node:test' import assert from 'node:assert/strict' import { addMonthsYmd } from './oa-confirmation-date' describe('addMonthsYmd', () => { it('simple month add', () => { assert.equal(addMonthsYmd('2026-01-15', 3), '2026-04-15') }) it('clamp end of month', () => { assert.equal(addMonthsYmd('2026-01-31', 1), '2026-02-28') }) it('zero months returns same day', () => { assert.equal(addMonthsYmd('2026-07-30', 0), '2026-07-30') }) it('invalid => null', () => { assert.equal(addMonthsYmd('', 3), null) assert.equal(addMonthsYmd('2026-01-15', -1), null) }) })