userEvent.setup vs not including it in unit tests
With React Testing Library v14, what are the benefits of using the userEvent.setup() for every test vs not including it?
Explore " unit tests" with insightful episodes like "userEvent.setup vs not including it in unit tests", "Feedback speed in TDD", "Unit Test vs Integration Test and The Testing Trophy", "Episode #035: Successful Unit Testing Through Collaboration with Your Unit" and "Episode 7: Static Sites and Testing" from podcasts like ""The Call Kent Podcast", "The Call Kent Podcast", "Python Test", "Relating to DevSecOps" and "The Ruby Blend"" and more!
With React Testing Library v14, what are the benefits of using the userEvent.setup() for every test vs not including it?
What feedback speed should we aim for in a frontend test suite? What's too slow?
A recent Twitter thread by Simon Willison reminded me that I've been meaning to do an episode on the testing trophy.
This discussion is about the distinction between unit and integration tests, what those terms mean, and where we should spend our testing time.
Links:
We know, we know! It's been too long between episodes, but we had some speaking engagements, conferences, and general life going into November and here we are.
In this episode we cover unit testing, what it means to security vs what it means to engineers and some learning along the way as we dig into what makes a good unit test. All to often security engineers are telling development teams they need to write security unit tests, but they don't say how or what to write. We go through definitions, potential examples, and a bit of debate on this riveting nerd out of an episode of R2DSO.
Summary
Nate, Ron, and Andrew stay quarantined along with the rest of the nation. Ron is
happy he has snacks, so he's good! In this episode, the guys talk about
Gatsby, Frontend JavaScript, Static Site Generation, and testing
frameworks. Also, find out why Ron and Andrew affectionately refer to Nate as "Grandpa".
Panelists
Andrew Mason
Nate Hopkins
Ron Cooke
Guest
None this week
Sponsor
Show Notes
[00:00:54] The guys start off by telling stories about how being
quarantined has changed the dynamic of their lives with family, jobs,
and social life.
[00:07:40] Andrew talks about he's been dabbling at static site
generators for years. He goes into his experience trying to componentize
it using React and Storybook. He also explains where his data lives for
the static site.
[00:10:25] "GraphQL" is explained and how it essentially wraps your
markdown. It also has a tool called "Graphical" that builds on your
queries.
[00:17:00] Nate asks how easy is it to build with Gatsby without
knowing React? Andrew explains and adds you need to figure out how JSX
works.
[00:19:14] Nate asks Andrew how his experience went with
componentizing things that he wanted to do with CodeFund codebase for a
while and how far did he take it and what lessons did he pull out of it?
[00:21:11] Andrew mentions if anyone has heard of Mark Dalgleish who
works on Playroom and has the best memes. He also mentions how Mark's
belief is that you should make spacing itself a component.
[00:26:08] Andrew mentions the component library he was looking at
called Braid-Design System.
[00:28:21] Andrew defines what "Storybook" is for anyone who may not
have been exposed to it. He says it's a pretty slick tool!
[00:35:20] Nate brings up the old Java days or the .net days and how
he feels the modern JavaScript ecosystem is even worse than the old Java
XML configuration days.. in which he gets called "Grandpa" by Ron.
[00:37:30] Nate talks about what's going on with his controller
library which contains three controllers right now and he has three
lined up.
[00:39:01] The guys all talk about testing and frameworks and how they
feel about them.
[00:47:00] Nate talks about a test suite he wrote called "PRY test."
Listen to hear why he created this and how he uses it.
[00:52:34] Nate touches on layered caching but for more info on this
check out Remote Ruby-Epsiode 70, where Nate talks more in depth about
layered caching stuff they did at CodeFund.
Links
★ Transistor.fm is now hosting an archive of the podcast for us. Learn how to start your own podcast!
Detta avsnitt är sponsrat av SPP, som just nu söker fullstack-utvecklare med .Net-bakgrund.
Jakob har kodat sen han fick sin första PC (486 DX2-66MHz!) i mitten på 90-talet, och har en förkärlek till att programmera stora (och därigenom oftast dyra) maskiner. Fick sitt första teleskop 1998 och kan nu kombinera sina intressen programmering och astronomi. Jobbar med PLC-programmering av världens största teleskop under konstruktion, ELT (Extremely Large Telescope). Driver bloggen AllTwinCAT och underhåller PLC-enhetstestramverket TcUnit.
Recording date: 2019-04-18
John Papa @John_Papa
Ward Bell @WardBell
Dan Wahlin @DanWahlin
Natalie Qabazard @Natqab
With conventional TDD, you write a failing test, get it to pass, then refactor.
Then run the tests again to make sure your refactoring didn't break anything.
But what if it did break something?
Kent Beck has been recommending to commit your code to revision control after every green test run.
Oddmund Strømme suggested a symmetrical idea to go ahead and revert the code when a test fails.
Kent writes that he hated the idea, but had to try it.
Then wrote about it last September.
And now we have TCR, "(test && commit) || revert".
What's it feel like to actually do this?
Well, Thomas Deniffel has been using it since about a month after that article came out.
In this episode, we'll hear from Thomas about his experience with it.
It's a fascinating idea. Have a listen and let me know what you think.
Special Guest: Thomas Deniffel.
Sponsored By:
Links:
An overview of the indispensable Uncle Bob's Clean Code. Chapters 10 through 13. Learn how to write code that's simple, expressive, easy to read, easy to maintain, and elegant.
Find Clean Code here: http://amzn.to/2Cd49HO
Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com
Prepping for an interview? https://iosinterviewguide.com/?promo=inside-ios-dev-ref
An overview of the indispensable Uncle Bob's Clean Code. Chapters 6 through 9. Learn how to write code that's simple, expressive, easy to read, easy to maintain, and elegant.
Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com
Fred Stevens-Smith of Rainforest explains the need for quality assurance testing and how to actually do it in the resource constrained environment of a startup.
Here's what to listen for:
Stay up to date
For any inquiries, please email us at hello@podcastworld.io