Тёмный

Reveal testing weakspots in your JavaScript code with Jest Coverage 

Swashbuckling with Code
Подписаться 9 тыс.
Просмотров 12 тыс.
50% 1

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

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@gmjitendra
@gmjitendra Год назад
Really useful to me to understand how to achieve coverage step by step. Thanks a lot for making this tutorial.
@SwashbucklingwithCode
@SwashbucklingwithCode Год назад
I'm pleased it was helpful, thank you for letting me know.
@xXSHREKKIDXx
@xXSHREKKIDXx 3 года назад
Thank you for going into so much detail and showing how it all works with an example project!
@SwashbucklingwithCode
@SwashbucklingwithCode 3 года назад
This one hasn't gotten much attention so far, so I'm really happy to hear someone found it useful.
@mithunkumar5185
@mithunkumar5185 11 месяцев назад
Great tutorial I have seen on Jest test case and it's coverage report. Good going bro....
@edlynvillegas6667
@edlynvillegas6667 2 года назад
Just started learning unit testing using jest. Thank you for this very helpful tutorial 🙌🏼
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
Awesome, good on you for getting into testing.
@mondo1926
@mondo1926 2 года назад
Just getting into the video but am impressed with the level of explanation so far. There's a lack of quality testing videos with jest on youtube, thanks for doing this for the community! Personally I struggle so much with writing tests, especially when its for code that I didnt write that didnt follow TDD. Being able to confidently write unit tests to prove why the code needs to be refactored is a seriously good skill to have in a job. Especially when the code that needs to be refactored was written by a more senior engineer.
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
I definitely agree, and once you get some skill at it, it can be a difficult thing to figure out how to teach. I've been keeping my eye out for good real world examples to show but I haven't been put back in the "legacy" refactor position in a bit.
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
If you (or anyone reading) have not read Refactoring by Martin Fowler, that is a good place to start, imo.
@mondo1926
@mondo1926 2 года назад
@@SwashbucklingwithCode Thanks for the book recommendation. It looks like a great place to start :D
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
@@mondo1926 No problem, and to be clear, it's not a book about testing but the concept of having tests before refactoring is talked about a chunk in it and helped me get into the right zone of thinking when I was newer to this stuff. I've still got plenty to learn. GL to ya.
@mondo1926
@mondo1926 2 года назад
@@SwashbucklingwithCode No worries man, thanks! Have a nice weekend!
@FrankArlt
@FrankArlt 2 года назад
Just learned something new :)
@jjaxner
@jjaxner 3 года назад
Great stuff here! Love to see an CI-video from you!
@SwashbucklingwithCode
@SwashbucklingwithCode 3 года назад
First request I've had for it. I do think it would be worthwhile, but do you have any ideas of what you'd like to see covered in it? More of a full set up from scratch type video, or just an overview of how to add certain actions/pipelines to your project? And any specific CI operations, like testing or linting, etc.
@hemanthemmady7071
@hemanthemmady7071 3 года назад
@@SwashbucklingwithCode Full setup from scratch
@fullstackprojects5615
@fullstackprojects5615 3 года назад
Thank you Jimmy! Pragmatic and pretty informative in depth journey!
@Fullflexno
@Fullflexno 2 года назад
You Are super awesome and skillfull teacher. Thanks from Norway!
@lucasrmendonca
@lucasrmendonca 2 года назад
This is so helpful! Thanks for the thorough explanation
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
Awesome, thank you for letting me know.
@lucasrmendonca
@lucasrmendonca 2 года назад
@@SwashbucklingwithCode I am getting a strange issue where it marks a template string literal such as: const MY_URL = `${BASE_URL}/foo` as "else branch not covered". Have you ever run into something like this? The BASE_URL is a const top-of-file String
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
@@lucasrmendonca My guess is that nothing is trying to use `MY_URL` without `BASE_URL` existing, though if it's declared in the same file outside of any function scope that does seem a bit strange to me.
@lucasrmendonca
@lucasrmendonca 2 года назад
@@SwashbucklingwithCode maybe this is getting transpiled by babel-jest into es5 or something so the coverage tool sees something in these lines that we don't? 🤔
@guilhermedatilio9546
@guilhermedatilio9546 2 года назад
Thank you! I really like the explanation!
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
Sweet, ty.
@MrCopot
@MrCopot 3 года назад
you do good job Sir, thanks for the tutorial!
@SwashbucklingwithCode
@SwashbucklingwithCode 3 года назад
Thank you.
@MatiazArg
@MatiazArg 2 года назад
Very good job, you are an awesome teacher!
@SwashbucklingwithCode
@SwashbucklingwithCode 2 года назад
Thank you.
@jercarlocatallo9216
@jercarlocatallo9216 2 года назад
This is a very great tuotiral and a great paisen
@prabhasjoshi4407
@prabhasjoshi4407 2 года назад
Ive implemented both these checks into my ci - global and folder level. But 1 problem i face is that mine is a really large codebase - and I want to add a more granular check over coverageThreshold check - such that coverageThreshold module check will only fire - if a developer changed that file - not if doesn't include any change for that module. example: if i set coverageThreshold > "module - 1 - path" : {statements: 40}, "module - 2 - path" : {statements: 50} then if some developer changes / adds code to "module - 1 - path" - only then fire the 40% check ? is this possible ?
@flashminat0x
@flashminat0x Год назад
thank you jesus christ
@haciendadad
@haciendadad Месяц назад
Do you do online teaching?
Далее
JavaScript Testing Basics with Jest
54:03
Просмотров 27 тыс.
小丑调戏黑天使的后果#short #angel #clown
00:16
Grand Final | IEM RIO 2024 | BO5 | КРNВОЙ ЭФИР
6:35:24
Тренеруем память physics drop 103 - 104
00:51
Using Storybook stories with Testing Library
35:23
Просмотров 19 тыс.
Fast Unit Testing With Vitest
1:21:09
Просмотров 32 тыс.
Mock vs Spy in Testing with Jest: Which is Better?
25:12
Mocking Axios in Jest + Testing Async Functions
17:43
React Testing Crash Course
58:36
Просмотров 318 тыс.
Stop Writing So Many Tests
10:02
Просмотров 91 тыс.