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.

Avsnitt(737)

065 JSJ Build Tools with Adam Hawkins

065 JSJ Build Tools with Adam Hawkins

PanelAdam Hawkins (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:16 - Adam Haw...

28 Juni 20131h

064 JSJ Ember Tools with Ryan Florence

064 JSJ Ember Tools with Ryan Florence

PanelRyan Florence (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rail...

21 Juni 201349min

063 JSJ Burnout

063 JSJ Burnout

PanelJamison Dance (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:47 - Burnou...

14 Juni 201348min

062 JSJ Dojo with Dylan Schiemann

062 JSJ Dojo with Dylan Schiemann

PanelDylan Schiemann (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) AJ O’Neal (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails R...

7 Juni 20131h 1min

061 JSJ Functional Reactive Programming with Juha Paananen and Joe Fiorini

061 JSJ Functional Reactive Programming with Juha Paananen and Joe Fiorini

PanelJuha Paananen (twitter github blog) Joe Fiorini (twitter github blog) AJ O’Neal (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twit...

31 Maj 201349min

060 JSJ Development Environments

060 JSJ Development Environments

PanelAJ O’Neal (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Discussion 01:09 - Mac, Windo...

24 Maj 201358min

059 JSJ jQuery Mobile with Todd Parker

059 JSJ jQuery Mobile with Todd Parker

PanelTodd Parker (twitter github) Joe Eames (twitter github blog) Jamison Dance (twitter github blog) Merrick Christensen (twitter github) Charles Max Wood (twitter github Teach Me To Code Rails Ramp ...

17 Maj 201326min

058 JSJ Building Accessible Websites with Brian Hogan

058 JSJ Building Accessible Websites with Brian Hogan

Use this link and code JAVAJAB to get 20% off your registration for FluentConf 2013!PanelBrian Hogan (twitter github blog) AJ O’Neal (twitter github blog) Joe Eames (twitter github blog) Merrick Chris...

10 Maj 201350min

Populärt inom Business & ekonomi

badfluence
framgangspodden
varvet
rss-jossan-nina
uppgang-och-fall
rss-borsens-finest
avanzapodden
fill-or-kill
svd-tech-brief
rss-inga-dumma-fragor-om-pengar
dynastin
rss-svart-marknad
bathina-en-podcast
lastbilspodden
borsmorgon
rss-kort-lang-analyspodden-fran-di
montrosepodden
24fragor
kapitalet-en-podd-om-ekonomi
rss-dagen-med-di