한글(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
- Uncertainty about the benefits of testing
- It's a hassle
- It's stressful
- It takes a long time
Why You Should Test
- Same bugs reappear
- Code is complex and requires many changes
- A change in one part causes errors in other parts
- You’re responsible for long-term maintenance
Should You Do TDD?
Can frontend even do TDD? → BDD