import test from 'node:test'; import assert from 'node:assert/strict'; import { formatNightSummaryDeliveryText } from './night-summary-library.mjs'; test('formatNightSummaryDeliveryText includes reflection and tomorrow hint', () => { const text = formatNightSummaryDeliveryText({ userId: 'user-night', timezone: 'Asia/Shanghai', now: Date.parse('2026-09-20T22:00:00+08:00'), }); assert.match(text, /^🌙 晚安总结 · 2026年9月20日/u); assert.match(text, /今日一句/u); assert.match(text, /明日提醒/u); assert.match(text, /取消9/u); });