zach.codes

Share this post

User's avatar
zach.codes
High Quality Integration Tests
Copy link
Facebook
Email
Notes
More

High Quality Integration Tests

Don't reach for end to end tests

Zach Silveira's avatar
Zach Silveira
Jan 17, 2023
∙ Paid

Share this post

User's avatar
zach.codes
High Quality Integration Tests
Copy link
Facebook
Email
Notes
More
Share

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!

For more articles like this, consider subscribing

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.

Already a paid subscriber? Sign in
© 2025 Zach Silveira
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More