Test driven development with Vue.js by Sarah Dayan
Vložit
- čas přidán 2. 07. 2024
- Testing a component can be counter-intuitive. It requires a mental shift to wrap your head around the differences between testing components and testing plain scripts, knowing what to test and understanding the line between unit and end-to-end tests.
TDD makes everything easier. Instead of writing tests by examining all bits and pieces of a finished project, and trying to guess what you should cover, you’re doing the opposite. You’re starting from actual specs, a list of things that the component should do, without caring about how it does it. This way, you’re ensuring that all you test is the public API of your component, but you’re also guaranteeing you don’t forget anything.
In this talk, we’ll cover why TDD is an ideal method for testing Vue components properly, and we’ll do it together live. We’ll deep dive into why TDD works the way it does, and how it can bring you full confidence over iterating on your Vue projects. At the end of the talk, you will know exactly what to test in your Vue components, and how to do it efficiently. - Věda a technologie
Find all conference videos here: vuetoronto.com/videos
Signup for conference updates here: vuetoronto.com
Want to learn Vue 3.0 from the experts? bit.ly/2v8QALV
That’s a very good introduction (and motivation) to TDD, applied to front-end development with Vue.js. Thank you, Sarah!
Coming from a PHP background I was familiar with TDD but how to apply these principles to Vue development had never really 'clicked' for me until watching this video. So thanks for helping me to have that 'aha' moment!
Great talk and the message is delivered very well! Thanks you Sarah.
Love it! Finally the 2nd step makes sense to me!
Thank you! Its really simple to understand with 3 steps
I loved this. I was trying TDD but was not confident in the approach but the way you explained made it very clear to me why this is necessary and also how to approach front-end components Test-driven development.
This really helps how we code and helps see how to structure or refactor it.
Well done presentation. It kept me focused, it was simple, and it explained the core principles as I need to understand them! Thank you. :)
one of the best, Sarah
Omg she's so awesome! I would watch her teach stuff all day
Thanks for sharing a drop of knowledge, rich content.
Congratulations!
very well presented.
Success!
Jeez I wish I could speak that succinctly. Great talk.
really nice presentation. thx!
Excellent Talk, Thanks!
1. You are awesome!
2. The issue with TDD and Testing in global is the setup configuration and sometimes the time to run and get feedback from them.
when u pass it over (as u say) the tests written is easier and faster
Thanks for your explanation, very clear and U R Rock in live coding :)
Thank you Chen! Unit tests should run fast, because they test small units and don't touch I/O. In my presentation, they took a bit longer than usual because somehow, when I set my computer offline, Jest suddenly became slow. In reality and on a daily basis, they're blazing fast.
BTW i am just wrote a medium article full influence to your presentation in Angular :) [off course full feed back to u]
So Thanks 4 your expression :)
I wrote first test suite for my vue components yesterday. took me only 2 days XD
thank you!
Great talk.
Great talk!
A really good one!
Great talk
2 minutes into the video and I'm already convinced
thanks !
Good talk
Thank you Sarah for the introduction, VueConf Toronto please upload code samples as well with the video.
This just serves to remind me that I'm really bad at writing tests. That is, only one project I've ever written has used tests. And they're out of date. And they're badly written tests.
I should put the ideas in this video into practice before I push to production again..
As an (embarrassingly recent) adopter of TDD, I now kinda laugh at myself from all the years I spent thinking I couldn;'t afford the time to write the tests first.
It does take time, obviously. But it takes at least one order of magnitude less time than it does to debug and fix broken code, especially when the fixes on one part start breaking another.
It's like that great Jack Bergman quote: "There's never enough time to do it right, but there's always enough time to do it over."
gooooooooood, love you
ty
yes mam
Why is "a non-regression test is always nice"?
If we used storybook's storyshots (which is actually using a jest feature) with puppeteer, we would get for free al the tests, that Sarah wrote in this demo.
I love storyshots:D I barely need e2e or unit tests next to them to feel confident about my code.
Does anyone know the vscode theme she is using?
great great great
When I visit tailwind page I see her face now I'm seeing her video look more fater
Now I know who is displayed on the main page of Tailwind 😂
99% TDD 1% Vue testing
1:37 Uncle Bob said that not Yoda :)