Тёмный

React Testing Crash Course with Next.js 

Anson the Developer
Подписаться 57 тыс.
Просмотров 31 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@kainorling7418
@kainorling7418 Год назад
finally you are back after 7 months we are glad that you are with us)
@ronitgandhi7716
@ronitgandhi7716 Год назад
Bro How you been?!! Welcome back, btw loved your livedstreams got to learn alot from the chuchat streams and really liked your keyboard cam streams...
@ansonthedev
@ansonthedev Год назад
Great. Thank you :)
@Anthony-wg7fn
@Anthony-wg7fn Год назад
Thanks for going through the setup and explaining this. Please make more projects with TDD and if you could please include Integration and E2E testing in the future.
@noormuhammad888
@noormuhammad888 Год назад
Amazing crash course. Started by knowing nothing about testing react apps and finished with confidence. I'm able to follow along with you using the Typescript. Thank you man.
@Doc131282
@Doc131282 Год назад
Welcome back, Anson. I was worried, that something bad happened. Thanks for another tutorial :)
@6little6fang6
@6little6fang6 Год назад
You are such a good teacher, I always find value in your videos.
@ansonthedev
@ansonthedev 10 месяцев назад
I'm late but thank you very much!
@НикитаКорниенко-й6р
@НикитаКорниенко-й6р 10 месяцев назад
cannot find module 'msw/node' from 'mocks/server.js', after the msw moved to v2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
@clouds187
@clouds187 Год назад
Welcome back anson! Im certain everybody missed you! Can’t wait for your livestreams!
@ThanhNhanTran-s7z
@ThanhNhanTran-s7z Год назад
Thank you for the helpful video. I have to say that the most intricate part when using jest is setting up the testing environment and you definitely help me overcome it. I have to read more and more to understand how the chain of libraries work together to make jest operate with browser API, browser features and DOM tree. Once again, thanks so much and I hope you can release more informative videos.
@MaxBrookman-Byrne
@MaxBrookman-Byrne 11 месяцев назад
Thanks for the video, it's really kind of you to share so much of your time! One note I have is that your VSCode colours aren't great for people with colour vision deficiency - I can barely see the red colours on your screen (e.g. brackets) which might not sound like a big deal but actually it can make it really difficult to grasp what you've written at times. Please consider switching to a palette that has better contrast throughout!
@SBourne-j6p
@SBourne-j6p 11 месяцев назад
Love that you did a TS setup. Will you be providing a TDD project with react + ts in the future? The react tdd with ts topic has a shortage of good learning materials.
@prashlovessamosa
@prashlovessamosa Год назад
Hey Anson long time your express playlist helps me alot I am very grateful to you Thank you
@ansonthedev
@ansonthedev Год назад
You're welcome. Great to hear that! :)
@emanoelinfinity
@emanoelinfinity Год назад
In the case of configuration using Typescript, we currently have to install Jest types as well.
@bideshbanerjee5506
@bideshbanerjee5506 Год назад
Finally you are back....your redux video was awesome
@ansonthedev
@ansonthedev Год назад
Thank you very much! :)
@vaibhavkumar8140
@vaibhavkumar8140 Год назад
Hey Anson welcome back, i hope you are good ❤😊
@gigantino
@gigantino Год назад
Can't find you on Discord anymore, so I guess that sending you a private message isn't an option. But I watched your very first discord bots and dashboard series, and you pretty much kickstarted my carreer. I have been working professionaly for a year now as a self-taught software engineer, thank you.
@grmn3564
@grmn3564 11 месяцев назад
I had this error: "Cannot find module '@testing-library/jest-dom/extend-expect' from 'jest.setup.js'" I fixed it by removing the 'extend-expect' part.
@SBourne-j6p
@SBourne-j6p 11 месяцев назад
If you get this error when running the test @13 mins... Cannot find module 'jest-dom/extend-expect' Change your import in jest setup file to this: import "@testing-library/jest-dom";
@VinayKumar-o8x8p
@VinayKumar-o8x8p Год назад
Welcome back miss your videos a lot🎉🎉🎉
@ansonthedev
@ansonthedev Год назад
Thank you!
@samane3672
@samane3672 Месяц назад
Very grateful for this
@slavg-k9l
@slavg-k9l 10 месяцев назад
at 40:33 if you are searching for role in Chrome/Chromium you can find it under Accessibility and not Computed Styles (at least on my end)
@hamzahahmad1670
@hamzahahmad1670 Год назад
Underrated channel
@Alireza-kw6fj
@Alireza-kw6fj Год назад
Should I see this video if i want testing in nextjs app router
@trut52
@trut52 Год назад
great video! even as an experienced programmer I learned something
@ehnryoo1482
@ehnryoo1482 Год назад
yoo, anson welcome back👍
@gabrielmnzs
@gabrielmnzs Год назад
Nice video! I have a question about next/image. How can I mock and test a component that has images inside?
@noormuhammad888
@noormuhammad888 Год назад
next/image are basically image elements in DOM. you can get it just like any other HTML element.
@anupamchakrawarti1803
@anupamchakrawarti1803 Год назад
Found you on r/react. Great tutorial. Could you please make part 2 with mockImplementation. So, the usage of this is with redux/redux toolkit dispatch events. In my current project, I am using Electron with React, since E2E framework like Cypress doesn't provide support, its hard to test my code. Also, the fact that IPC events are tricky to test. Would love a tutorial touching these domains as well. Again, welcome back, what I could infer from fellow devs comments. :D
@ansonthedev
@ansonthedev Год назад
Thank you!
@SO-xs6wu
@SO-xs6wu Год назад
Welcome Back 😁
@Doppio_00
@Doppio_00 Год назад
use App router nextjs13 import {useRouter} from 'next/navigation'; const router = useRouter(); This is not testable when used Please help
@AstraSlade
@AstraSlade Год назад
Same here
@focusme-tv3650
@focusme-tv3650 Год назад
I have the same issue... Router is not mounted yet when trying to render a component. Please make a video about it 🥺
@nataliafrontend
@nataliafrontend Год назад
Hi! Im looking for Jest tutorial for nextjs with app directory. Does anyone know anything about it?
@SBourne-j6p
@SBourne-j6p 11 месяцев назад
Isn't looking for specific text in the dom the same as testing implementation? The text could easily change and this makes the tests more brittle.
@ansonthedev
@ansonthedev 11 месяцев назад
Of course the context matters here, if you're looking for a specific text in the DOM as a result of a behavior, then no it is not. The text value in the DOM can be the result of an async operation that happened, e.g: making an API call. Of course if you were testing if the API call was made, instead of focusing on testing the result of what happens after the API call, then that would be testing the implementation.
@SBourne-j6p
@SBourne-j6p 11 месяцев назад
Interesting. What if you are testing the expected text from an api call but the returned response from the api call varies per call even with the same payload i.e. Getting appointment data from a store or products from a cms that someone else updates? At that point, checking text from api's in your test would fail of someone updates the content coming from the cms etc... no?@@ansonthedev
@ansonthedev
@ansonthedev 10 месяцев назад
No, because you aren't actually running those tests while your API is being called in a production environment. You're thinking that if someone is actively using the app, it is going to cause the test to fail. Well tests don't run in the live production app. They run when you run them locally, when you run them on a Pipeline, before deployments, etc. everything BUT when the live app is running. In your example, you would actually: 1) Call an API with a Payload, assert a behavior on the DOM occurred after the API call was made. 2) Call the API again and change the data with something else, assert the expected behavior occurred. So each time you are making a change to the API in your test, you are asserting that the output of that change happened on the page. When people use your app live, you are not re-running your tests again. Tests are designed to run isolated away from the actual software. Not while the software is running.
@prashlovessamosa
@prashlovessamosa Год назад
Hey Anson can you please make next 13.4 lecture it would be super helpful. Happy Teachers day.
@cyanide2426
@cyanide2426 Год назад
Yay, you're back!
@ciach0_
@ciach0_ Год назад
You're back! What happened to your Discord account?
@senne4179
@senne4179 Год назад
what keyboard you use or switches?
@ansonthedev
@ansonthedev Год назад
Ducky Blue Switches
@developer_01
@developer_01 Год назад
Welcome back, bro... Learn a lot from your project livestream.
@ansonthedev
@ansonthedev Год назад
Thank you! I'm happy to hear. :)
@samiulsk3651
@samiulsk3651 Год назад
The bangle bazz
@9abour
@9abour Год назад
Great job... Thanks.
@darthvader7683
@darthvader7683 Год назад
wonderful content
@jorgealmonacid3131
@jorgealmonacid3131 Год назад
Just thank you ❤
@alirezasoheili1701
@alirezasoheili1701 Год назад
This is awesome thanks a lot
@myothuko6380
@myothuko6380 Год назад
Welcome Back Anson
@lifeisbeautifu1
@lifeisbeautifu1 Год назад
Thank you!
@ansonthedev
@ansonthedev Год назад
You're welcome. :)
@legends_assemble4938
@legends_assemble4938 8 месяцев назад
Thanks!
@ansonthedev
@ansonthedev 8 месяцев назад
Thank you! :)
@hofimastah
@hofimastah Год назад
Hi Man. I cannot join discord
@icicles0
@icicles0 Год назад
Nice
@hasina8570
@hasina8570 Год назад
❤•••
@oscarortiz5794
@oscarortiz5794 Год назад
i miss your streams what happened!
@ansonthedev
@ansonthedev Год назад
I'll be back soon :)
@oscarortiz5794
@oscarortiz5794 Год назад
@@ansonthedev thankgod, you were the only one that kept me coding since we used similar technologies, havent coded since lol
@cake6103
@cake6103 Год назад
gg
@rudzkygen
@rudzkygen Год назад
I had a problem while configuring jest with typescript - .toBeInTheDocument() was not found. Here's quick fix: pnpm add -D @types/testing-library__jest-dom
@呂學霖-m6t
@呂學霖-m6t Год назад
me too, it seems like there is no extend-expect in @testing-library/jest-dom
@noormuhammad888
@noormuhammad888 Год назад
@@呂學霖-m6t @rudzkygen replace your jest.setup,js with the following and it should work import "@testing-library/jest-dom";
Далее
Introduction to Jest Testing | JavaScript Unit Tests
25:30
React Testing for Beginners: Start Here!
1:17:14
Просмотров 109 тыс.
小丑调戏黑天使的后果#short #angel #clown
00:16
GENIUS FOOD HACKS 🍰 #shorts
00:36
Просмотров 17 млн
React Testing Crash Course
58:36
Просмотров 318 тыс.
Mocking Asynchronous Functions with Jest
21:50
Просмотров 71 тыс.
React Crash Course | Learn React Quickly | In 80 Minutes
1:17:07
The Most Important Design Pattern in React
35:04
Просмотров 73 тыс.
TypeScript in React - COMPLETE Tutorial (Crash Course)
53:21
Stop Writing So Many Tests
10:02
Просмотров 91 тыс.
Тестирование React приложения
1:03:02
.NET and C# are in trouble. Here is what I'd do.
10:57