The method of getting the elements for comments has changed since this video's release. This was giving me an error until I made the following suggested change: const comments = await waitFor(() => screen.getAllByTestId("comment")); -> replaced with -> const comments = await screen.findAllByTestId("comment"); A very minor change, but it fixed an error that was appearing as a result. Also, this tutorial was awesome and super helpful! Thanks for making it!
Very helpful video. Could you please make videos on jest and react testing library which includes concepts like jest.spyOn, .mockImplementation, .resolves, .rejects, promise, .mockResolvedValueOnce etc. I am not finding any tutorials on this and in my project these things are heavily used
hi, i got error like could not find react-redux context value; please ensure the component is wrapped in a but i also wrapped by provider within store and i change old to latest version please gave me a any solution
Subscribed 👍🏼, please create more videos on react testing with Jest and react testing library.
Nice and very help full video. Thanks for sharing.
Awesome... quite helpful
Glad it helped
The method of getting the elements for comments has changed since this video's release. This was giving me an error until I made the following suggested change:
const comments = await waitFor(() => screen.getAllByTestId("comment")); -> replaced with -> const comments = await screen.findAllByTestId("comment");
A very minor change, but it fixed an error that was appearing as a result.
Also, this tutorial was awesome and super helpful! Thanks for making it!
it has to be replaced with const comments = await screen.findAllByTestId("comment");
Very helpful video. Could you please make videos on jest and react testing library which includes concepts like jest.spyOn, .mockImplementation, .resolves, .rejects, promise, .mockResolvedValueOnce etc. I am not finding any tutorials on this and in my project these things are heavily used
Hi Prem, I will do it soon. I know these concepts or functions are heavily used in Jest.
hi, i got error like could not find react-redux context value; please ensure the component is wrapped in a
but i also wrapped by provider within store and i change old to latest version please gave me a any solution
Is you App component wrapped in Provider?
Thank you so much sir
how to run this test code with sonar-scanner
Hi, How can i test when data coming from API instead dummy data
Will make a details video on that as well.
SyntaxError: Cannot use import statement outside a module
I am getting this error Please help 😥
Have you added this test script in package.json file?
"test": "react-scripts test --transformIgnorePatterns node_modules/jest/bin/jest.js/",
@@codingwithabbas It worked Thank you 🙏
hey, how are you getting autocomplete on jest...?
Check is this package (@types/jest) present in your package.json file.
@@codingwithabbas no its not there... where should I put this...? should it be inside any other object or at the root of the package.json object....?
Install it as dev dependency.
cool
𝓅𝓇𝑜𝓂𝑜𝓈𝓂
Can you give me your mail id I have one question!! My tsx component not rendering 😢
Component is not rendering? Can you see any error?
@@codingwithabbas yes that's why I have to send some code pictures and also explain why I am getting error
Because that is my project which will be deploy on 21 -8+ -2024 can you help me then must help ??