Test-Driven Development // Fun TDD Introduction with JavaScript

Test-Driven Development // Fun TDD Introduction with JavaScript

Fireship

3 года назад

623,325 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Anthony Mazzie
Anthony Mazzie - 11.11.2023 21:21

Great material, as always. Thanks!

Ответить
Tester AI
Tester AI - 01.10.2023 10:35

Code tester

Ответить
SlimShadyIAm
SlimShadyIAm - 23.09.2023 12:54

What was the purpose of installing Vite in this case?

Ответить
Andy Hoch
Andy Hoch - 26.07.2023 23:04

The best Thumbnail ever on a Developers Channel! ✝️

Ответить
Nodsaibot
Nodsaibot - 02.06.2023 02:46

writing code to pass tests is equivalent of making movies to get awards

Ответить
RaduKing
RaduKing - 12.05.2023 14:21

Mutation testing for coverage.

Ответить
James Smith
James Smith - 07.05.2023 15:45

Unit testing client facing JS = No thanks.

Ответить
jg
jg - 03.04.2023 13:00

In 2023 we can just use Playwright to cover important paths and Storybook to document and test all our component state in isolation or composition. Then we check all our use cases with interactions, accessibility and visuals regression tests. In my opinion this is way superior than standard Jest because it gives us way more confidence that all our use cases are working from the user's perspective in our supported browsers and viewports and that the visual were not impacted by CSS leaks. I don't see any benefits to TDD on the front-end for component driven apps whatsoever.

Ответить
ag daboss
ag daboss - 31.03.2023 03:10

Watching this video to procrastinate on my stack data type assignment only for him to say let’s start by making a stack data type

Ответить
Donia El Fouly
Donia El Fouly - 21.03.2023 16:18

thanks

Ответить
Handsome_Hero
Handsome_Hero - 15.02.2023 21:12

The words 'fun' and 'JavaScript' do not belong in the same sentence.

Ответить
Gabriel Audette
Gabriel Audette - 09.02.2023 21:41

You should build your stack inside each tests and not in the beforeEach() even tho it doesn't respect the DRY principle it respect a more valuable principle in TDD call AAA

Ответить
ariel batista
ariel batista - 02.02.2023 23:24

TDD doesn't make sense in the front end

Ответить
Muhittin Darı
Muhittin Darı - 26.01.2023 17:41

Guys is there any good source or course for Jest and Cypress , including the TDD ? I cant find any good one.

Ответить
Tom Fotheringham
Tom Fotheringham - 23.01.2023 11:46

All tests should read top down. I really hate beforeEach etc. There should be no code in your tests. If anyone in my team writes code in tests I suggest that they write tests for their tests.

Ответить
glowlog
glowlog - 23.01.2023 11:21

What would I do without fireship, lmao

Ответить
Bhaskar Mahto
Bhaskar Mahto - 22.01.2023 19:04

Which vscode theme is this?

Ответить
Chris O'Dillman
Chris O'Dillman - 19.01.2023 09:01

i never wrote tests, did not use typescript, had no clue about ci .. i learn this stuff right now in my new job and i love it!

Ответить
Lasse Leegaard
Lasse Leegaard - 06.01.2023 04:04

Code coverage is a bad metric and should not be used. During TDD development test and code come and go. Some times tests go away because parts of the code is tested with other test. This leaves gaps in the coverage, but all the relevant functionality is still tested.
I often find that I am at the third or fourth generation of both tests and code when a relatively simple function or part of my code is done. This is mostly because my understanding of the problem at hand develops during development.
An often overlooked aspect of TDD is edge cases. You can get a false sense of accomplishment with one or two tests for a function; they test the core functionality of the function but only just that. If the function is fed garbage or something unexpected, it breaks. Putting some thought into this to get a 360 degree view of the code yields a much more robust code base.

Ответить
Shira Ishikawa
Shira Ishikawa - 04.01.2023 19:55

I've read and watch a lot of TDD guides and I still can't wrap my head around why we needed it.

Ответить
LifePortal
LifePortal - 28.12.2022 21:59

Thank you for making such an informative video im learning alot from it

But you go too fast and just speak too fast and do everything fast i have to stop every couple of seconds to make sure im following your steps

Ответить
kitsurubami
kitsurubami - 11.12.2022 08:33

red being green and green being red in the first 1 second of video really messed with me

Ответить
Oseni Daniel
Oseni Daniel - 06.12.2022 13:42

This is testing oversimolified. Love it!!

Could you do a course one cypress with js or do you have a course on that?

Ответить
Festivejelly
Festivejelly - 16.11.2022 19:30

I prefer playwright to Cypress

Ответить
Bandar a
Bandar a - 12.11.2022 21:55

Is it normal that I’m playing your videos all the time while i have a very little knowledge about what you’re saying just because your voice makes me calm 😐

Ответить
Kamal Moustafa
Kamal Moustafa - 02.11.2022 13:08

This looks like a complete waste of time. Why would i do something as stupid as testing if an object is created, when i have no class for this object?

Ответить
zapxcero
zapxcero - 12.10.2022 02:28

the first 30 seconds made me spit out my coffee.

Ответить
HARIS JOSE
HARIS JOSE - 11.10.2022 01:09

❤️❤️

Ответить
BixelBG
BixelBG - 02.10.2022 00:21

As a tech lead of the QA automation team in my company I can't stress enough how important is Cypress for web testing. And if done right it can do much more than Selenium with waaay less test flakyness

Ответить
szeredai akos
szeredai akos - 27.09.2022 16:27

"Improve the maintainability in the long run" - false:
Catching side effect - and solving it is fine for the first time, but an application which is prone to repeated side-effects has an exponential curve on maintenance. Testing does not help that in any way shape or form.

Good tutor tho'

Ответить
David Russell
David Russell - 24.09.2022 18:38

Comment for Commenting's sake.

Ответить
Jez
Jez - 17.09.2022 02:07

Every example of TDD uses an extremely simple Mickey Mouse requirement. Implement a basic stack. And even then it's not fully tested. For anything remotely complex I've found TDD completely impractical. You'll end up rewriting all your tests again at the end when you discover that 95% of the methods and functionality were unaccounted for, or different than predicted.

Ответить
37DMK
37DMK - 16.09.2022 07:30

Test driven development implies, that you write a failing test first, then write Code to make it green, then you refactor. Makes sense. Hands down, when you start the frontend of a webpage, do you start with a cypress test, or do you make a mock-up of some sort first? If you actually start with the cypress test, i can respect that. What kind of test do you start with if you have to train an AI model then? Just curious.

Ответить
Suryajit7
Suryajit7 - 12.09.2022 13:49

I'm a tester and this is one of the best explanations for different testing strategies one can look for

Ответить
Muhammad Sadiq
Muhammad Sadiq - 31.08.2022 00:29

What's the advice on writing a correct test and how do one know their test is even correct when going taking TDD approach

Ответить
Muhammad Sadiq
Muhammad Sadiq - 31.08.2022 00:24

@Fireship always keeping things simple and straight to the point, Thanks for this.
As someone just coming into testing and expected to do TDD one major challenge I face is not knowing if its my test that's bad or if my feature implementation are just wrong, this makes me cut corners. Writing the code then testing it (but this can lead to bias, as I've been told)

Ответить
R C
R C - 29.08.2022 21:57

It was good to not show "mocking" here since it is in 99% times not needed. Mock frameworks get abused most of the time to write quick but bad tests.

Ответить
Samyar
Samyar - 19.08.2022 12:46

Is tdd approach work with end2end testing? Idk how to use tdd in e2e testinf

Ответить
ggBin
ggBin - 17.08.2022 09:29

Pog

Ответить
Andrew Sharpe
Andrew Sharpe - 17.08.2022 09:21

Would love to see a tutorial on mocking in jest. I find it really tricky to understand

Ответить
bug developer
bug developer - 11.08.2022 16:13

dynamic time-warping algorithm in jQuery in 100 seconds😁

Ответить
Ibrahim alshubaily
Ibrahim alshubaily - 08.08.2022 12:32

I think add might have a bug init

Ответить
Kai Ivo
Kai Ivo - 30.07.2022 09:00

The cool thing is, the error output tells you exactly what code to write next. Also it is more beneficial to have only one expect per test case. That way if the test fails you know exactly which part of the component is broken. Arrange, act, assert.

Ответить