import test from 'node:test';
import assert from 'node:assert/strict';

import { formatLocalDate } from './format';

test('formatLocalDate formats a local calendar date as YYYY-MM-DD', () => {
  assert.equal(formatLocalDate(new Date(2026, 5, 26, 23, 59)), '2026-06-26');
});

test('formatLocalDate pads month and day', () => {
  assert.equal(formatLocalDate(new Date(2026, 0, 2, 8, 5)), '2026-01-02');
});
