epicweb-dev / rocket-rental

Rent Rockets from rocking awesome people
Other
277 stars 34 forks source link

fix: vitest afterAll fails on Windows #13

Closed onemen closed 1 year ago

onemen commented 1 year ago

this fix this issue here

but is see many warnings from MSW]

stderr | app/routes/bookings+/$bookingId.test.tsx > returns 404 for a booking that does not involve the user
[MSW] Warning: captured a request without a matching request handler:

  • GET https://loremflickr.com/512/512/transport

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/getting-started/mocks

stderr | app/routes/ships_+/$shipId.book.test.tsx > returns booking data from the session
[MSW] Warning: captured a request without a matching request handler:

  • GET https://loremflickr.com/512/512/nature

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/getting-started/mocks
kentcdodds commented 1 year ago

We need to change the seeding to not get images from the internet and instead get it from the local file system like we're doing in the epic stack. This means we'll need to download a bunch of images for this.

onemen commented 1 year ago

We need to change the seeding to not get images from the internet and instead get it from the local file system like we're doing in the epic stack. This means we'll need to download a bunch of images for this.

just seed the test.db with few tiny images

kentcdodds commented 1 year ago

Yes, we just need to remove anything in the repo that downloads images and instead loads them from the filesystem instead. like this and this