import { describe, expect, it } from 'vitest' import { renderNotificationActionUrlPreview, renderNotificationTemplate } from '@/lib/notificationTemplate' describe('notification template preview', () => { it('substitutes sample variables and leaves unknown placeholders visible', () => { expect( renderNotificationTemplate('رزرو شما برای «{{eventTitle}}» تأیید شد {{missing}}', { eventTitle: 'دورهمی آخر هفته', }) ).toBe('رزرو شما برای «دورهمی آخر هفته» تأیید شد {{missing}}') }) it('encodes action URL sample values', () => { expect(renderNotificationActionUrlPreview('/bookings/{{bookingId}}', { bookingId: 'a/b' })).toBe('/bookings/a%2Fb') }) })