RUN  v4.1.2 F:/Coding/MeshiTrack/packages/web node.exe : stderr | src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > loads and displays the list At line:1 char:1 + & "C:\nodejs/node.exe" "C:\nodejs/node_modules/npm/bin/npx-cli.js" vi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (stderr...splays the list:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Each child in a list should have a unique "key" prop. Check the render method of `ShoppingListDetailsPage`. See https://react.dev/link/warning-keys for more information. stderr | src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > loads and displays the list TypeError: fetch failed  at node:internal/deps/undici/undici:16416:13  at processTicksAndRejections (node:internal/process/task_queues:103:5) at ApiClient.get (F:/Coding/MeshiTrack/packages/web/src/services/api-client.ts:46:17) { [cause]: AggregateError:  at internalConnectMultiple (node:net:1134:18)  at afterConnectMultiple (node:net:1715:7) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } } ✓ src/components/__tests__/ThemeProvider.test.tsx (8 tests) 116ms ✓ src/app/(dashboard)/medicines/__tests__/page.test.tsx (3 tests) 123ms ✓ src/components/__tests__/TopBar.test.tsx (4 tests) 277ms ✓ src/app/(dashboard)/products/__tests__/ImportDialog.test.tsx (11 tests) 359ms ✓ src/components/__tests__/ui.test.tsx (11 tests) 285ms ✓ src/app/__tests__/page.test.tsx (2 tests) 254ms ✓ src/components/__tests__/Sidebar.test.tsx (8 tests) 334ms stderr | src/app/(dashboard)/dashboard/__tests__/page.test.tsx > DashboardPage > shows "good shape" message when no critical alerts Each child in a list should have a unique "key" prop. Check the render method of `DashboardPage`. See https://react.dev/link/warning-keys for more information. ✓ src/app/(dashboard)/medicines/schedule/__tests__/page.test.tsx (14 tests) 408ms stderr | src/app/(dashboard)/shopping-lists/__tests__/page.test.tsx > ShoppingListsPage > loads and displays shopping lists Each child in a list should have a unique "key" prop. Check the render method of `ShoppingListsPage`. See https://react.dev/link/warning-keys for more information. ✓ src/app/(dashboard)/dashboard/__tests__/page.test.tsx (13 tests) 406ms ❯ src/app/(dashboard)/shopping-lists/prices/__tests__/page.test.tsx (3 tests | 3 failed) 52ms  × renders loading initially 42ms  × loads and displays analytics 4ms  × handles fetch errors gracefully 3ms ✓ src/app/(dashboard)/shopping-lists/__tests__/page.test.tsx (6 tests) 710ms ✓ toggles create list modal and submits  319ms stderr | src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > toggles an item check TypeError: fetch failed  at node:internal/deps/undici/undici:16416:13  at processTicksAndRejections (node:internal/process/task_queues:103:5) at ApiClient.get (F:/Coding/MeshiTrack/packages/web/src/services/api-client.ts:46:17) { [cause]: AggregateError:  at internalConnectMultiple (node:net:1134:18)  at afterConnectMultiple (node:net:1715:7) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } } stderr | src/app/(dashboard)/medicine-prices/__tests__/page.test.tsx > MedicinePricesPage > renders Medicine Prices heading when householdId exists An update to MedicinePricesContent inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to MedicinePricesContent inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act stderr | src/app/(dashboard)/refills/__tests__/page.test.tsx > RefillsPage > renders Refills heading when householdId exists An update to AlertsPanel inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to AlertsPanel inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to RefillListsPanel inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to RefillListsPanel inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act ✓ src/app/(dashboard)/recipes/new/__tests__/page.test.tsx (3 tests) 203ms ✓ src/app/(dashboard)/recipes/[id]/edit/__tests__/page.test.tsx (4 tests) 283ms ✓ src/app/(dashboard)/recipes/[id]/__tests__/page.test.tsx (11 tests) 557ms ✓ src/app/(dashboard)/purchases/__tests__/page.test.tsx (26 tests) 2317ms ✓ src/app/(dashboard)/stores/__tests__/page.test.tsx (22 tests) 2286ms ✓ toggles a preset tag and adds a custom tag  445ms ✓ src/app/(dashboard)/pantry/__tests__/page.test.tsx (15 tests) 801ms ✓ src/app/(dashboard)/recipes/__tests__/RecipeEditor.test.tsx (9 tests) 831ms ✓ src/app/(dashboard)/recipes/__tests__/page.test.tsx (22 tests) 885ms stderr | src/app/(dashboard)/medicines/__tests__/ActivityTab.test.tsx > ActivityTab > loads more events when Load more is clicked Encountered two children with the same key, `ev-1`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. stderr | src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > adds a new item to the list TypeError: fetch failed  at node:internal/deps/undici/undici:16416:13  at processTicksAndRejections (node:internal/process/task_queues:103:5) at ApiClient.get (F:/Coding/MeshiTrack/packages/web/src/services/api-client.ts:46:17) { [cause]: AggregateError:  at internalConnectMultiple (node:net:1134:18)  at afterConnectMultiple (node:net:1715:7) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } } stderr | src/app/(dashboard)/medicine-prices/__tests__/page.test.tsx > MedicinePricesPage > shows Load more button in price history Encountered two children with the same key, `pr-1`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. ✓ src/app/(dashboard)/medicines/__tests__/ActivityTab.test.tsx (18 tests) 979ms ✓ src/app/(dashboard)/products/__tests__/page.test.tsx (11 tests) 1234ms ✓ filters by search input with debounce  413ms stderr | src/app/(dashboard)/medicines/__tests__/LibraryTab.test.tsx > LibraryTab > filters medicines by search, category, and form An update to LibraryTab inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to LibraryTab inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to LibraryTab inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to LibraryTab inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act An update to LibraryTab inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act ✓ src/app/(dashboard)/medicines/__tests__/OrganizerTab.test.tsx (20 tests) 1394ms ✓ src/app/(dashboard)/medicine-prices/__tests__/page.test.tsx (15 tests) 1432ms stderr | src/app/(dashboard)/medicines/__tests__/CabinetTab.test.tsx > CabinetTab > changes quantity and unit in AddToCabinetForm An update to AddToCabinetForm inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act ✓ src/app/(dashboard)/products/__tests__/ProductModal.test.tsx (18 tests) 1701ms ✓ calls onSave with correct data on valid submit  331ms ✓ src/app/(dashboard)/settings/__tests__/page.test.tsx (20 tests) 3677ms ✓ allows editing the household name  438ms ✓ shows error when name update fails  458ms ✓ shows fallback error when non-Error thrown on name update  372ms stderr | src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > completes the trip and syncs to pantry TypeError: fetch failed  at node:internal/deps/undici/undici:16416:13  at processTicksAndRejections (node:internal/process/task_queues:103:5) at ApiClient.get (F:/Coding/MeshiTrack/packages/web/src/services/api-client.ts:46:17) { [cause]: AggregateError:  at internalConnectMultiple (node:net:1134:18)  at afterConnectMultiple (node:net:1715:7) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } } ✓ src/app/(dashboard)/medicines/__tests__/LibraryTab.test.tsx (14 tests) 2075ms ✓ creates medicine and refreshes list  515ms ✓ shows fallback error when non-Error is thrown on create medicine  466ms ❯ src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx (5 tests | 5 failed) 4140ms  × renders loading initially 57ms  × loads and displays the list 1035ms  × toggles an item check 1019ms  × adds a new item to the list 1016ms  × completes the trip and syncs to pantry 1009ms ✓ src/app/(dashboard)/refills/__tests__/page.test.tsx (26 tests) 3097ms ✓ src/app/(dashboard)/medicines/__tests__/CabinetTab.test.tsx (29 tests) 3172ms ✓ src/app/(dashboard)/medicines/__tests__/RegimensTab.test.tsx (32 tests) 3206ms ✓ src/app/(dashboard)/medicines/cabinet/__tests__/page.test.tsx (3 tests) 106ms ✓ src/app/(dashboard)/medicines/organizer/__tests__/page.test.tsx (3 tests) 108ms ✓ src/app/(dashboard)/medicines/regimens/__tests__/page.test.tsx (3 tests) 106ms ✓ src/app/(dashboard)/medicines/[id]/__tests__/page.test.tsx (34 tests) 3690ms ✓ toggles Add Product form  339ms stdout | src/lib/useShoppingListSync.test.ts > useShoppingListSync > handles incoming item_updated messages correctly 🛒 Connected to shopping list real-time sync: list1 stdout | src/lib/useShoppingListSync.test.ts > useShoppingListSync > broadcasts toggle item messages when connected 🛒 Connected to shopping list real-time sync: list1 stdout | src/lib/useShoppingListSync.test.ts > useShoppingListSync > handles disconnect and reconnect backoff 🛒 Connected to shopping list real-time sync: list1 🔌 Sync severed: test 🔄 Attempting sync handshake reconnect (1/5)... ✓ src/lib/useShoppingListSync.test.ts (4 tests) 49ms ✓ src/app/(dashboard)/__tests__/layout.test.tsx (1 test) 54ms ✓ src/app/(dashboard)/medicines/activity/__tests__/page.test.tsx (3 tests) 94ms ✓ src/app/(dashboard)/medicines/library/__tests__/page.test.tsx (3 tests) 98ms ✓ src/lib/__tests__/useApi.test.ts (7 tests) 33ms ✓ src/app/(dashboard)/__tests__/loading.test.tsx (1 test) 37ms ✓ src/services/__tests__/api-client.test.ts (14 tests) 28ms ✓ src/services/__tests__/recipes.test.ts (11 tests) 17ms ✓ src/services/__tests__/products.test.ts (12 tests) 18ms ✓ src/services/__tests__/regimens.test.ts (8 tests) 13ms ✓ src/services/__tests__/refills.test.ts (9 tests) 11ms ✓ src/services/meal-plans.test.ts (9 tests) 12ms ✓ src/services/__tests__/organizer.test.ts (7 tests) 8ms ✓ src/services/__tests__/stores.test.ts (6 tests) 9ms ✓ src/services/shopping-lists.test.ts (12 tests) 12ms ✓ src/services/__tests__/pantry.test.ts (13 tests) 16ms ✓ src/services/__tests__/cabinet.test.ts (11 tests) 14ms ✓ src/services/__tests__/households.test.ts (5 tests) 9ms ✓ src/services/prices.test.ts (5 tests) 10ms ✓ src/services/__tests__/medicines.test.ts (12 tests) 14ms ✓ src/services/nutrition-targets.test.ts (4 tests) 8ms ✓ src/services/__tests__/purchases.test.ts (7 tests) 8ms ✓ src/services/__tests__/cabinet-events.test.ts (7 tests) 13ms ✓ src/services/__tests__/medicine-prices.test.ts (7 tests) 10ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 8 ⎯⎯⎯⎯⎯⎯⎯  FAIL  src/app/(dashboard)/shopping-lists/prices/__tests__/page.test.tsx > ShoppingListPricesPage > renders loading initially  FAIL  src/app/(dashboard)/shopping-lists/prices/__tests__/page.test.tsx > ShoppingListPricesPage > loads and displays analytics  FAIL  src/app/(dashboard)/shopping-lists/prices/__tests__/page.test.tsx > ShoppingListPricesPage > handles fetch errors gracefully Error: invariant expected app router to be mounted  ❯ useRouter ../../node_modules/next/src/client/components/navigation.ts:179:10  ❯ PricesAnalyticsPage src/app/(dashboard)/shopping-lists/prices/page.tsx:25:18  23| export default function PricesAnalyticsPage() {  24| const { householdId, isLoading } = useApi();  25| const router = useRouter();  | ^  26| const [data, setData] = useState<any>(null);  27| const [loading, setLoading] = useState(true);  ❯ Object.react_stack_bottom_frame ../../node_modules/react-dom/cjs/react-dom-client.development.js:25904:20  ❯ renderWithHooks ../../node_modules/react-dom/cjs/react-dom-client.development.js:7662:22  ❯ updateFunctionComponent ../../node_modules/react-dom/cjs/react-dom-client.development.js:10166:19  ❯ beginWork ../../node_modules/react-dom/cjs/react-dom-client.development.js:11778:18  ❯ runWithFiberInDEV ../../node_modules/react-dom/cjs/react-dom-client.development.js:874:13  ❯ performUnitOfWork ../../node_modules/react-dom/cjs/react-dom-client.development.js:17641:22  ❯ workLoopSync ../../node_modules/react-dom/cjs/react-dom-client.development.js:17469:41  ❯ renderRootSync ../../node_modules/react-dom/cjs/react-dom-client.development.js:17450:11 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/8]⎯  FAIL  src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > renders loading initially TestingLibraryElementError: Unable to find an element with the text: Shopping List. 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  
  Hydrating session checklist... 
    ❯ 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/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx:48:19  46| vi.mocked(useApiModule.useApi).mockReturnValue({ householdId: null…  47| render(<ShoppingListDetailPage />);  48| expect(screen.getByText('Shopping List')).toBeInTheDocument();  | ^  49| });  50| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/8]⎯  FAIL  src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > loads and displays the list TestingLibraryElementError: Unable to find an element with the text: Apple. 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  
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
      
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
   {  52| render(<ShoppingListDetailPage />);  53| await waitFor(() => {  | ^  54| expect(screen.getByText('Test List')).toBeInTheDocument();  55| expect(screen.getByText('Apple')).toBeI nTheDocument(); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/8]⎯  FAIL  src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > toggles an item check TestingLibraryElementError: Unable to find an element with the text: Apple. 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  
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
      
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
   {  60| render(<ShoppingListDetailPage />);  61| await waitFor(() => expect(screen.getByText('Apple')).toBeInTheDoc…  | ^  62|  63| const checkboxes = screen.getAllByRole('checkbox'); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/8]⎯  FAIL  src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > adds a new item to the list TestingLibraryElementError: Unable to find an element with the text: Apple. 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  
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
      
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
  );  80| await waitFor(() => expect(screen.getByText('Apple')).toBeInTheDoc…  | ^  81|  82| const toggleBtn = screen.getByRole('button', { name: /Add Product/… ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/8]⎯  FAIL  src/app/(dashboard)/shopping-lists/[id]/__tests__/page.test.tsx > ShoppingListDetailPage > completes the trip and syncs to pantry TestingLibraryElementError: Unable to find an element with the text: Apple. 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  
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
      
  Test List    active    Live Sync Channel Operational 
         Back to Hub         Check Lowest Store Options     
  
  Other / Misc       Ingredient Loading... 
   Qty:  5    
  );  91| await waitFor(() => expect(screen.getByText('Apple')).toBeInTheDoc…  | ^  92|  93| const finishBtn = screen.getByRole('button', { name: /Finish Trip/… ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/8]⎯