Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.26 KB

README.md

File metadata and controls

33 lines (20 loc) · 1.26 KB

🧪🧪 Intro to unit testing and API testing using javascript and nodejs 🧪🧪

Why testing

  • Reducing bug in production
  • Gain confidence in product
  • Can be used as documentation

Type of testing

type of testing image credit JavaScript testing best practice

We will know three types of testing

  • ✅ Unit testing
  • ✅ API testing (kind of integration testing)
  • ☑️ End to end testing (e2e)

The testing pyramid

type of testing

image credit https://www.headspin.io/

What we are using

  • Jest as test runner and assertion library.

    • Has both test runner (e.g. mocha) and assertion library (e.g. chai) integrated
    • We Need to familiar with matcher functions
  • Supertest for testing node.js HTTP server