It’s a common cycle. If you’ve been programming long enough, I’m sure you’ve seen it.
Should we write tests at all?
Turns into: eventually writing unit tests.
At this point, I see many teams move on to a tool like playwright.
Then we start to see complaints about how long tests are taking to complete. Running them in a CI environment can take a really long time with e2e tests.
At this point people either write less tests, or I’ve even seen tests deleted because they have had so many issues over time!
The Unit Path
For some reason, I’ve seen managers over the years assume that any test outside of a browser is a “unit” test. I’ve also found those same managers run teams where a common test looks like this:
test('converts weekly price to annual', () => {
expect(convertToAnnualPrice('weekly', PlusPlan)).toEqual(728);
});
First, let me say. There is nothing wrong with this test. In fact, it’s a test I have in our own codebase at work.
The problem is…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.