Recent Articles - Testing

Reporting Lerna Monorepo Test Coverage to Codecov

Feb 20, 2023 · 3 min read

It's not straightforward, and you likely can't use preexisting CI tasks.

Patterns for Structuring a Unit Test

Feb 3, 2022 · 6 min read

Unit tests should be testing acceptance criteria, not internal behavior. Here are some patterns to help accomplish that.

Testing Docker Images with Container Structure Test

Jul 18, 2020 · 4 min read

Just because a Docker image builds successfully doesn't mean it will perform as expected. Google's container Structure Test tool helps you check images to make sure they're working as intended.

Debugging Remote Jest Tests

Feb 20, 2020 · 4 min read

I ran into the need to debug Jest tests running inside a Docker container recently and didn't find any clear instructions on how to do it. Turns out it's pretty easy when you have the right flags.

Linting Metalsmith Output HTML

Dec 8, 2019 · 3 min read

Best I know, there aren't any good ways to test the output of a Metalsmith build to make sure things like updated dependencies didn't break styling or content. But one thing we can do is lint the output HTML to make sure it's at least syntactically correct and doesn't contain broken links.