Unit Testing in Javascript

An introduction to unit testing

Photo by Karl Pawlowicz on Unsplash
  • Mocha — one of the oldest JS unit testing frameworks, there is a lot of documentation provided online, but takes time to configure
  • Ava — performs tests asynchronously/concurrently and contains simple syntax.
  • Jasmine — compatible across every JS framework and especially beneficial for frontend testing and checking that the app is responsive and corrects depending on device. Best for larger applications that integrate with multiple external libraries.
  • Puppeteer — developed by Google and supports ES6 features like async, etc. Tests are browser-specific, so it provides a lot of support for responsive testing as well.

full-stack developer exploring how software can solve real-world problems | https://sarabastian.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store