fix(release): harden packaging and filename localization

This commit is contained in:
NimBold
2026-07-30 05:08:26 +03:30
parent 1634118f11
commit 924e108f3c
6 changed files with 41 additions and 5 deletions
+8
View File
@@ -58,6 +58,14 @@ describe('date/time formatting', () => {
expect(formatted).toContain('123');
});
it('uses the default Persian date when only locale or timezone options are supplied', () => {
expect(formatDateTime(instant, {
locale: 'fa',
calendar: 'persian',
options: { timeZone: 'UTC' }
})).toBe('۱۴۰۵/۰۱/۰۱');
});
it('returns a safe placeholder for malformed timestamps and rejects unknown preferences', () => {
expect(formatDateTime('not-a-timestamp', { locale: 'en' })).toBe('-');
expect(isCalendarPreference('gregorian')).toBe(true);