Presentations
Templates
Features
Teams
Pricing
Log in
Sign up
Log in
Sign up
Menu
Testing
Why do we need testing?
Create more resilient code
It's an in-demand skill
Test-Driven Development
Test-Driven Development
Write a test
Run test (it should fail)
Write just enough code for the test to pass
Run test (it now passes)
Refactor code, make improvements
Repeat process
Unit Testing
Write code to test code
isolate specific units of your code.
Following a recipe
Jest
End-to-End
Test whether the app is functioning from start to finish.
Cypress
We're going to focus on Unit Testing, using Jest
Jest helps us test:
Vanilla JS
React apps
React Native apps
Many other JS frameworks
Best Practices
Have only one assert per test method
Avoid test interdependence
Each test takes care of its own setup and teardown
Don't let tests rely on other tests
Keep tests simple and easy to read
Sling
Some
Code
Testing
By jonmcd
Made with Slides.com
Testing
163
jonmcd
More from
jonmcd