JSJ 411: Unit Testing Jest with Daniel Caldas episode artwork

EPISODE · Dec 10, 2019 · 59 MIN

JSJ 411: Unit Testing Jest with Daniel Caldas

from JavaScript Jabber · host Charles M Wood

Daniel Caldas is calling from Singapore. He currently works as a software engineer for Zendesk and has also worked in Portugal and Germany. He has worked primarily on the frontend with Node and JavaScript. He talks about his experience testing JavaScript, how he got started with Jest, and why he likes it. Daniel finds Jest very easy to use and straightforward. He likes that  Jest has a single reference page for documentation. He feels that Jest is largely complete out of the box and has only made a small add on to get rid of Boilerplate in some tests.Daniel explains what a snapshot, how they work, and why he prefers fixtures over factories. He gives tips on how to set up your tests so that they are easy to follow. He finds it helps to structure your scenarios in the fixture description. He talks about gotchas in Jest. While Jest is largely easy to use, Jest has been around for a while and breaking changes do happen. It’s important to check what version your code base is using. While there are a lot of free sources around Jest online, he advises listeners to stick as close to the official documentation as possible, or to people associated with Jest, and to read recent stuff. As for conventions, Jest has pretty much everything out of the box and the built in conventions make it easy to navigate any project that uses Jest.Daniel talks about some of the features available in Jest, converting observables into promises, and tricks he has used to make tests easier to put together. He talks about his method for keeping his mocks and stubs straight. He advises listeners to have some organizational rules, such as starting the imports alphabetically, and to always follow those rules. He talks about how he runs tests and what environments he uses. While Jest is normally used for unit testing, Daniel has also used it for end to end tests, and he talks about his experience with an open source project doing both types in Jest. Daniel concludes the show by advising listeners starting with JavaScript and frontend, don’t think too much about the library you’re going to use because you’ll probably end up using Jest. It’s more important to have unit tests and a proper testing framework at the beginning than anything else. He also invites listeners to check out his open source work on Github.PanelistsAimee KnightAJ O’NealCharles Max Wood **To receive your 40% OFF coupon for Manning Publications (good for all our products in all formats) visit us on Facebook - click on "Send A Message"and type "YES"**GuestDanile CaldasSponsorsSentry | Use the code “devchat” for $100 credit LinksZendeskJestReactBabelESLintAsync/AwaitCypressReact-d3-graphUnrevealed tips for unit testing with JestPicksAimee Knight:The Difference Between Fault Tolerance, High Availability, and Disaster RecoveryAJ O’Neal:Rubin Report with Lindsay ShepherdCharles Max Wood:White ChristmasHoliday InnDaniel Caldas:Home AloneSpecial Guest: Daniel Caldas. Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Episode metadata supplied by the publisher feed · Published Dec 10, 2019

Embed this episode

Ready to play

JSJ 411: Unit Testing Jest with Daniel Caldas

0:00 59:50

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

BAT Community Podcast BAT Community & Brave Basic Attention Token (BAT) is a revolutionary digital advertising and rewards platform from the inventor of JavaScript and co-founder of Mozilla and Firefox that rewards users in Ethereum-based BAT tokens. Brave is a fast, BAT-powered privacy browser that blocks all 3rd-party ads and trackers by default. Learn more about BAT, Brave and tech with this podcast! Over Engineered Chris Morrell A podcast where we explore unimportant programming questions (mostly PHP/Laravel/JavaScript) in extreme detail. Web Development Fundamentals - SOFT6007 Dcom1 Colin Manning Web development technologies such as HTML, CSS, JavaScript and others are at the core of all modern online systems. This module introduces the student to these technologies and provides the student with the skills necessary to develop web sites with dynamic presentation. JS Party: JavaScript, CSS, Web Development Changelog Media Your weekly celebration of JavaScript and the web. Current panelists: Jerod Santo, Kevin Ball (KBall), Nick Nisi, Chris Hiller, Amal Hussein & Amy Dutton.Past panelists: Suz Hinton, Feross Aboukhadijeh, Amelia Wattenberger, Divya Sasidharan, Alex Sexton, Rachel White, Emma Bostian, Ali Spittel, Mikeal Rogers & Jessica Sachs.We talk about the web platform (Chrome, Safari, Edge, Firefox, Brave, etc), front-end frameworks (ReactJS, SolidJS, Svelte, VueJS, AngularJS, etc), JavaScript and TypeScript runtimes (Node, Deno, Bun), web animation, SVG, TailwindCSS, robotics, IoT, and much more. If JavaScript and/or the web touch your life, this show’s for you.Some people search for JSParty and can't find the show, so now the string JSParty is in our description too.

Frequently Asked Questions

How long is this episode of JavaScript Jabber?

This episode is 59 minutes long.

When was this JavaScript Jabber episode published?

This episode was published on December 10, 2019.

Can I download this JavaScript Jabber episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!