Files
TREK/client/src/components/Planner/DayPlanSidebar.constants.test.ts
T
Maurice d01d9df93a refactor(planner): share the day note draft and save between desktop and phone
The desktop note dialog and the phone note sheet fill their editor with
dayNoteDraft and save through writeDayNote, so both trim the title, store an
empty detail as null and default the icon the same way. Both count the detail
line against one shared limit.
2026-10-09 07:16:40 +00:00

14 lines
557 B
TypeScript

// FE-PLANNER-NOTELIMIT-001: the detail limit both day note editors count against.
import { describe, expect, it } from 'vitest';
import { DAY_NOTE_DETAIL_MAX, dayNoteNearLimit } from './DayPlanSidebar.constants';
describe('day note detail limit', () => {
it('FE-PLANNER-NOTELIMIT-001: the counter warns from a hundred characters before the limit', () => {
expect(DAY_NOTE_DETAIL_MAX).toBe(2000);
expect(dayNoteNearLimit(1899)).toBe(false);
expect(dayNoteNearLimit(1900)).toBe(true);
expect(dayNoteNearLimit(2000)).toBe(true);
});
});