JSJ 411: Unit Testing Jest with Daniel Caldas

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.

Episoder(738)

202 JSJ DoneJS + CanJS with Justin Meyer

202 JSJ DoneJS + CanJS with Justin Meyer

Check out and get your tickets for React Remote Conf! May 11th-13th, 2016. 02:30 - Justin Meyer IntroductionTwitter GitHubBitoviJavaScriptMVC03:02 - DoneJS and CanJS@DoneJS  @CanJS05:44 - Versus Meteo...

9 Mar 201655min

201 JSJ Security with Troy Hunt

201 JSJ Security with Troy Hunt

02:32 - Troy Hunt IntroductionTwitter GitHub BlogTroy Hunt's Pluralsight Courses04:12 - Why should people care about security?06:19 - When People/Businesses Get Hacked09:47 - “Hacking”Social Engineeri...

2 Mar 20161h 7min

200 JSJ EPISODE 200!!!

200 JSJ EPISODE 200!!!

02:52 - What’s up Merrick Christensen?Twitter GitHubBlog03:43 - Favorite EpisodesEpisode #124: The Origin of Javascript with Brendan EichEpisode #037: Specialized vs Monolithic with James Halliday and...

24 Feb 201633min

199 JSJ Visual Studio Code with Chris Dias and Erich Gamma

199 JSJ Visual Studio Code with Chris Dias and Erich Gamma

Check out allremoteconfs.com to get in on all the conference action this year -- from the comfort of your own home! 02:13 - Chris Dias IntroductionTwitter GitHub02:21 - Erich Gamma IntroductionTwitter...

17 Feb 20161h

198 JSJ 2015 Recap and 2016 Predictions

198 JSJ 2015 Recap and 2016 Predictions

02:36 - Big Changes in the JavaScript Community in 2015Star Wars (Joke)Star Wars | Code.orgThe Star Wars APIThe Year of ReactMerge Between Node.js and io.jsThe Year of Tool FatigueJavaScript Jabber Ep...

10 Feb 201659min

197 JSJ Auth0 with Kassandra Perch

197 JSJ Auth0 with Kassandra Perch

02:03 - Kassandra Perch IntroductionTwitter GitHub Blog02:46 - Auth0 04:10 - Centralized Auth Services: Handing Out User Data to Third Parties05:32 - Security, Storage, and Compliance08:48 - Managing ...

3 Feb 201640min

196 JSJ Tabris.js with Jochen Krause and Ian Bull

196 JSJ Tabris.js with Jochen Krause and Ian Bull

Check out Freelance Remote Conf and React Remote Conf! 02:31 - Jochen Krause IntroductionTwitterEclipseSource03:21 - Ian Bull IntroductionTwitter GitHub Blog04:01 - Tabris.jstabris-js (GitHub)04:48 - ...

27 Jan 20161h 8min

195 JSJ Rollup.js with Rich Harris and Oskar Segersvärd

195 JSJ Rollup.js with Rich Harris and Oskar Segersvärd

02:17 - Rich Harris IntroductionTwitter GitHub BlogThe Guardian02:34 - Oskar Segersvärd IntroductionTwitter GitHubWidespace02:50 - rollup.jsrollup - npm 04:47 - Caveats and Fundamental Differences Bet...

20 Jan 20161h 4min

Populært innen Business og økonomi

lydartikler-fra-aftenposten
stopp-verden
dine-penger-pengeradet
e24-podden
rss-penger-polser-og-politikk
rss-borsmorgen-okonominyhetene
livet-pa-veien-med-jan-erik-larssen
pengepodden-2
finansredaksjonen
pengesnakk
tid-er-penger-en-podcast-med-peter-warren
stormkast-med-valebrokk-stordalen
utbytte
morgenkaffen-med-finansavisen
liberal-halvtime
okonomiamatorene
rss-politisk-preik
rss-markedspuls-2
lederpodden
rss-sunn-okonomi