Check out my course called Next Level Next.js! A full stack course covering GraphQL, TypeScript, Apollo, Prisma, auth and lots more! next.leighhalliday.com
Mocking APIs is really important. Sometimes Back-end is not ready and you want to work in parallel. We can mock based API contracts and test end to end flow. Thanks for sharing! 🚀
If you set this up in remix project, should I put importing "../mocks" inside of "root.jsx"? That causes me an issue that root.jsx will run on client side. Do you have better idea to solve this? Thanks
Hey Eung! Honestly I don't have a great answer for you... I haven't done any testing in Remix, and it doesn't seem like they have a testing guide on their website. I would recommend popping into the Remix Discord channel and asking what they recommend.
Check out my course called Next Level Next.js! A full stack course covering GraphQL, TypeScript, Apollo, Prisma, auth and lots more! next.leighhalliday.com
Pro trick : you can watch movies on Flixzone. Been using them for watching loads of movies during the lockdown.
@Esteban Van definitely, I have been watching on Flixzone} for since december myself :D
Mocking APIs is really important. Sometimes Back-end is not ready and you want to work in parallel. We can mock based API contracts and test end to end flow. Thanks for sharing! 🚀
Thanks Devtools!!
Thanks for this video.
I actually looked into MSW recently to introduce tests in components that use React Query!
you mean like integration tests? because I don't think unit test will require it.
Thanks Arctic! Glad you enjoyed the vid! MSW is awesome!
interesting topic, never thought about mocking api before. ty!
No prob Alex! It's useful if a different team is working in parallel on a new API... this way you can get unblocked before the API is actually ready.
Awesome as always 👍😀
Thanks Ranga! I appreciate it!
thank you, Leigh! it helps me a lot.
Hey Rima! Glad it helped :D
Amazing thanks Leigh!
Thank you Brian!!
Great content. Thanks!
Thank you Nathan!
Very good video!
Hey Leigh,
Thank you very much for the great video, this can be really a life save :)
By the way, do you know if this works for tests too?
Thanks Helio! It does!! I have a video on it actually :) th-cam.com/video/v77fjkKQTH0/w-d-xo.html
@@leighhalliday How much code can we recycle for testing?
If you set this up in remix project, should I put importing "../mocks" inside of "root.jsx"?
That causes me an issue that root.jsx will run on client side.
Do you have better idea to solve this?
Thanks
I actually put "require("../mocks");" inside of "context.client.tsx".
Does anyone know if this is ok?
BTW, thanks for the great contents!
I moved back to "root.tsx"
and used NODE_ENV
```if (process.env.NODE_ENV === "development") {
require("../mocks");
}
```
Hey Eung! Honestly I don't have a great answer for you... I haven't done any testing in Remix, and it doesn't seem like they have a testing guide on their website. I would recommend popping into the Remix Discord channel and asking what they recommend.
25 minutes to nothing! To make a Json-server is 30 seconds, but how can I call it from my app ?