JSJ 411: Unit Testing Jest with Daniel Caldas
JavaScript Jabber10 Joulu 2019

JSJ 411: Unit Testing Jest with Daniel Caldas

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.Panelists
  • Aimee Knight
  • AJ O’Neal
  • Charles 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"**Guest
  • Danile Caldas
Sponsors
  • Sentry | Use the code “devchat” for $100 credit
LinksPicksAimee Knight:AJ O’Neal:Charles Max Wood:Daniel Caldas:Special Guest: Daniel Caldas.

Support this podcast at — https://redcircle.com/javascript-jabber/donations

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Jaksot(737)

Being a New Developer with Diego Moura - JSJ 553

Being a New Developer with Diego Moura - JSJ 553

Diego Moura is a newer developer who has recently joined the ranks of professional developers. The panel talks to Diego about his career as a fashion designer and how he moved to Canada and go into pr...

18 Loka 20221h 33min

Dan Shappir's Failed Predictions - JSJ 552

Dan Shappir's Failed Predictions - JSJ 552

The panel goes back a few years and reviews some technology predictions that Dan made a few years ago on Quora. These include WASM, Progressive web apps, and others. Most were wrong, but one did end u...

4 Loka 20221h 13min

Software Development as a Craft with Netta Bondy - JSJ 551

Software Development as a Craft with Netta Bondy - JSJ 551

Today we talk with Netta Bondy, a front end developer at Twang and dive into a discussion about when software development becomes a craft. We discuss the challenges of practicality vs. art, and the ch...

27 Syys 20221h 17min

Partytown with Adam Bradley - JSJ 550

Partytown with Adam Bradley - JSJ 550

Today we talk with Adam Bradley, the Director of Technology at Builder.io. He previously worked at Ionix as a creator of Ionic Framework, a mobile UI interface builder for web applications, and Stenci...

20 Syys 20221h 16min

Qwik with Misko Hevery - JSJ 549

Qwik with Misko Hevery - JSJ 549

Today we talk with Misko Hevery about solving the loading speed issue for websites constructed using JavaScript frameworks. Such websites are often slow to load, which is detrimental to their ability ...

13 Syys 20221h 11min

Web Performance and the Google WordPress Team with Felix Arntz - JSJ 548

Web Performance and the Google WordPress Team with Felix Arntz - JSJ 548

Today we talk with Felix Arntz, a developer relations engineer at Google.  Hired on the Google WordPress team, and involved with the Sidekick plugin, we discuss some of the challenges and approaches o...

6 Syys 20221h 24min

Supply Chain Security with Stephen Chin - BONUS

Supply Chain Security with Stephen Chin - BONUS

There is no question that the volume, sophistication, and severity of software supply chain attacks is on the rise.  How do you navigate your supply chain security?  Stephen Chin joins the show today ...

2 Syys 202243min

Even More JavaScript Features You Should Avoid - JSJ 547

Even More JavaScript Features You Should Avoid - JSJ 547

Today’s episode is a continuation of the previous JavaScript Jabber Episode 543, where we discuss JS language features to avoid.  Do you agree with the list?  Today we talk about:for inforEachelsenull...

30 Elo 20221h 15min

Suosittua kategoriassa Liike-elämä ja talous

sijotuskasti
mimmit-sijoittaa
psykopodiaa-podcast
rss-rahapodi
pomojen-suusta
ostan-asuntoja-podcast
rss-rahamania
rss-draivi
herrasmieshakkerit
rss-myyntikoulu
rss-sami-miettinen-neuvottelija
rahapuhetta
inderespodi
salkunrakentaja-podi
juristipodi
rss-lahtijat
rss-bisnesta-bebeja
rss-seuraava-potilas
rss-set-for-life-sijoita-ja-vaurastu
rss-rahataito-podcast