> baby-sleep-tracker-frontend@0.1.0 test > vitest run --reporter=dot RUN v2.1.9 /Users/jhag/projects/babymonitor/frontend ✓ tests/simple.test.ts (1 test) 1ms ✓ tests/unit/chartHelpers.test.ts (9 tests) 2ms ✓ tests/unit/time.test.ts (16 tests) 3ms ✓ tests/unit/StatusBanner.test.tsx (5 tests) 19ms ✓ tests/unit/TimeAdjuster.test.tsx (3 tests) 24ms ❯ src/components/stats/SleepTimetable.test.tsx (4 tests | 3 failed) 42ms × SleepTimetable > renders loading state 17ms → Invalid Chai property: toBeInTheDocument × SleepTimetable > renders empty state when no data is available 1ms → Invalid Chai property: toBeInTheDocument × SleepTimetable > renders the grid correctly with hourly rows and biennial labels 19ms → Unable to find an element with the text: SUN. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   Sleep Timetable        Sun 
  Mon      00:00        02:00        04:00        06:00        08:00        10:00        12:00        14:00        16:00        18:00        20:00        22:00              ✓ tests/unit/SleepButton.test.tsx (3 tests) 62ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/components/stats/SleepTimetable.test.tsx > SleepTimetable > renders loading state Error: Invalid Chai property: toBeInTheDocument ❯ src/components/stats/SleepTimetable.test.tsx:21:53 19| (useStats as any).mockReturnValue({ timetable: null, isLoading: tr… 20| render(); 21| expect(screen.getByText(/Loading timetable.../i)).toBeInTheDocumen… | ^ 22| }); 23| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯ FAIL src/components/stats/SleepTimetable.test.tsx > SleepTimetable > renders empty state when no data is available Error: Invalid Chai property: toBeInTheDocument ❯ src/components/stats/SleepTimetable.test.tsx:27:50 25| (useStats as any).mockReturnValue({ timetable: { slots: [] }, isLo… 26| render(); 27| expect(screen.getByText(/No data available/i)).toBeInTheDocument(); | ^ 28| }); 29| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯ FAIL src/components/stats/SleepTimetable.test.tsx > SleepTimetable > renders the grid correctly with hourly rows and biennial labels TestingLibraryElementError: Unable to find an element with the text: SUN. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   Sleep Timetable        Sun 
  Mon      00:00        02:00        04:00        06:00        08:00        10:00        12:00        14:00        16:00        18:00        20:00        22:00              ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19 ❯ src/components/stats/SleepTimetable.test.tsx:48:19 46| 47| // Check for day headers 48| expect(screen.getByText('SUN')).toBeInTheDocument(); // 2025-04-20… | ^ 49| expect(screen.getByText('MON')).toBeInTheDocument(); // 2025-04-21… 50| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯ Test Files 1 failed | 6 passed (7) Tests 3 failed | 38 passed (41) Start at 20:10:38 Duration 718ms (transform 173ms, setup 0ms, collect 475ms, tests 155ms, environment 2.78s, prepare 242ms)