React Testing Strategy: What to Test and Why
Learn what to test, what to skip, and how to keep tests maintainable. This course focuses more on how to know what to test.
Testing Fundamentals
Why Bother Writing Tests?
Pro
Unit vs Integration vs E2E: The Argument That Never Ends
Pro
Your Tests Shouldn't Know How Your Code Works - testing behaviour not implementations
Pro
What to Test
Not Everything Deserves a Test. Here's How to Choose
Pro
Testing Logic and Pure Functions
Current
How to write good integration tests so you know everything will work when wired together
Pro
Common Pitfalls
Brittle Tests - How to avoid them by thinking about your tests before you write them
Pro
What are flaky tests and approaches to avoid having them in your test suite
Pro
Why assertions that pass don't always mean your app works (false positives & false negativesin tests)
Pro
Code Smells, but for Your Tests - Testing Mistakes Everyone Makes
Pro
React Testing Strategy: What to Test and Why: Testing Logic and Pure Functions
Testing Logic and Pure Functions
This site is all about testing frontend apps, so at first you might think that I focus just on what renders on the page, interactivity like clicking, and just generally how things look.
But that is just the UI part of an application - it is almost guaranteed that you have some kind of business logic, calculations, and simple pure functions.
In this lesson I'll go over my approach to testing them so that your tests:
- give you confidence they're working
- don't under-test, don't over-test
- and how to catch edge cases
Loading full lesson...
Share this lesson with your teamTweet (X) it
Invite a teammate to learn with you by sharing this lesson or dropping the link in your team chat.