added watermark settings tab on the branding page and added more package details to the billing page, added a new guest notifications page
This commit is contained in:
20
resources/js/admin/mobile/__tests__/guestMessages.test.ts
Normal file
20
resources/js/admin/mobile/__tests__/guestMessages.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { formatGuestMessageDate } from '../guestMessages';
|
||||
|
||||
describe('guest messages helpers', () => {
|
||||
it('returns placeholder for empty value', () => {
|
||||
expect(formatGuestMessageDate(null, 'en-GB')).toBe('—');
|
||||
});
|
||||
|
||||
it('passes through invalid dates', () => {
|
||||
const value = 'not-a-date';
|
||||
expect(formatGuestMessageDate(value, 'de-DE')).toBe(value);
|
||||
});
|
||||
|
||||
it('formats valid ISO timestamps', () => {
|
||||
const formatted = formatGuestMessageDate('2024-01-02T12:00:00Z', 'en-GB');
|
||||
expect(formatted).not.toBe('—');
|
||||
expect(formatted).not.toBe('2024-01-02T12:00:00Z');
|
||||
expect(formatted).toContain('2024');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user