한글(ko) 버전

jest (JavaScript + Test, also has meaning of ‘joke’)

A Testing Framework Made by Facebook

Supports TypeScript! Fully supports Babel/React/Node.js.

There are alternatives like Vitest (Vite), Jasmine, Mocha+Sinon+Chai.

Jest

Why People Avoid Testing

  1. Uncertainty about the benefits of testing
  2. It's a hassle
  3. It's stressful
  4. It takes a long time

Why You Should Test

  1. Same bugs reappear
  2. Code is complex and requires many changes
  3. A change in one part causes errors in other parts
  4. You’re responsible for long-term maintenance

Should You Do TDD?

Can frontend even do TDD? → BDD