
> rentaldrivego@1.0.0 test:marketplace
> npm run test --workspace @rentaldrivego/marketplace


> @rentaldrivego/marketplace@1.0.0 test
> vitest run

[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m

 RUN  v1.6.1 /Volumes/ExternalApps/Documents/car_management_system/apps/marketplace

 ✓ src/lib/api.test.ts  (5 tests) 6ms
 ❯ src/lib/appUrls.test.ts  (5 tests | 1 failed) 6ms
   ❯ src/lib/appUrls.test.ts > marketplace app URL resolution > resolves server URLs from forwarded host/proto and handles invalid fallbacks safely
     → expected 'https://market.example.com:3000' to be 'https://market.example.com' // Object.is equality
 ✓ src/lib/renter.test.ts  (4 tests) 29ms
 ✓ src/lib/preferences.test.ts  (3 tests) 2ms
 ✓ src/middleware.test.ts  (5 tests) 40ms
 ✓ src/lib/footerContent.test.ts  (4 tests) 8ms
 ✓ src/components/FooterContentPage.test.ts  (4 tests) 6ms
 ✓ src/components/MarketplaceShell.content.test.ts  (4 tests) 3ms
 ❯ src/components/WorkspaceFrame.boundary.test.ts  (5 tests | 1 failed) 7ms
   ❯ src/components/WorkspaceFrame.boundary.test.ts > WorkspaceFrame helpers > sends users with an employee token directly to the dashboard frame path
     → expected '/dashboard/sign-in' to be '/dashboard' // Object.is equality
 ✓ src/lib/i18n.server.test.ts  (3 tests) 2ms
 ✓ src/lib/i18n.test.ts  (2 tests) 3ms
 ✓ src/components/BookingForm.boundary.test.ts  (5 tests) 2ms
 ✓ src/app/(public)/footer/[slug]/page.test.ts  (3 tests) 4ms
 ✓ src/app/(public)/app-policy-pages.test.ts  (2 tests) 3ms
 ✓ src/components/MarketplaceHeader.boundary.test.ts  (4 tests) 2ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/components/WorkspaceFrame.boundary.test.ts > WorkspaceFrame helpers > sends users with an employee token directly to the dashboard frame path
AssertionError: expected '/dashboard/sign-in' to be '/dashboard' // Object.is equality

- Expected
+ Received

- /dashboard
+ /dashboard/sign-in

 ❯ src/components/WorkspaceFrame.boundary.test.ts:28:44
     26|     stubBrowser({ cookie: 'other=1; employee_session=token_123' })
     27| 
     28|     expect(getDefaultFramePath('sign-in')).toBe('/dashboard')
       |                                            ^
     29|   })
     30| 

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  src/lib/appUrls.test.ts > marketplace app URL resolution > resolves server URLs from forwarded host/proto and handles invalid fallbacks safely
AssertionError: expected 'https://market.example.com:3000' to be 'https://market.example.com' // Object.is equality

- Expected
+ Received

- https://market.example.com
+ https://market.example.com:3000

 ❯ src/lib/appUrls.test.ts:36:89
     34| 
     35|   it('resolves server URLs from forwarded host/proto and handles inval…
     36|     expect(resolveServerAppUrl('http://localhost:3000', 'market.exampl…
       |                                                                                         ^
     37|     expect(resolveServerAppUrl('http://localhost:3000', null)).toBe('h…
     38|     expect(resolveServerAppUrl('/relative', 'market.example.com')).toB…

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯

 Test Files  2 failed | 13 passed (15)
      Tests  2 failed | 56 passed (58)
   Start at  00:09:12
   Duration  619ms (transform 491ms, setup 3ms, collect 1.20s, tests 123ms, environment 2ms, prepare 1.10s)

npm error Lifecycle script `test` failed with error:
npm error code 1
npm error path /Volumes/ExternalApps/Documents/car_management_system/apps/marketplace
npm error workspace @rentaldrivego/marketplace@1.0.0
npm error location /Volumes/ExternalApps/Documents/car_management_system/apps/marketplace
npm error command failed
npm error command sh -c vitest run
