AI Implementation feature(890): Admin Area General Settings and Categories 1.08 (#30)

This commit was merged in pull request #30.
This commit is contained in:
2026-07-22 15:11:01 +00:00
parent 282fcbab94
commit 2a6182b938
6 changed files with 112 additions and 263 deletions
+15
View File
@@ -90,6 +90,21 @@ describe('datetime helpers', () => {
it('toIsoUtc returns input verbatim when empty', () => {
expect(toIsoUtc('')).toBe('');
});
it('toIsoUtc interprets datetime-local components as UTC regardless of browser timezone', () => {
expect(toIsoUtc('2027-03-15T08:30')).toBe('2027-03-15T08:30:00.000Z');
expect(toIsoUtc('2027-03-17T16:45')).toBe('2027-03-17T16:45:00.000Z');
});
it('toIsoUtc preserves seconds and milliseconds when present', () => {
expect(toIsoUtc('2027-03-15T08:30:15')).toBe('2027-03-15T08:30:15.000Z');
expect(toIsoUtc('2027-03-15T08:30:15.123')).toBe('2027-03-15T08:30:15.123Z');
});
it('toIsoUtc round-trips with toDatetimeLocal in UTC', () => {
expect(toIsoUtc(toDatetimeLocal('2027-03-15T08:30:00.000Z'))).toBe('2027-03-15T08:30:00.000Z');
expect(toIsoUtc(toDatetimeLocal('2027-03-17T16:45:00.000Z'))).toBe('2027-03-17T16:45:00.000Z');
});
});
describe('pageTitleError', () => {