shlogg · Early preview
Ramu Narasinga @karthik-m22

TRPC Istanbul Usage And Coverage Analysis

tRPC uses Istanbul.js for test coverage, with vitest/coverage-istanbul as the provider. Istanbul is used in conjunction with Turbo, an incremental bundler and build system.

In this article, we analyze Istanbul usage in tRPC source code. I found this comment — istanbul ignore if. This hints that tRPC uses Istanbul.js, a tool that makes JavaScript test coverage simple.
This one took me a while to figure out that tRPC repository uses @vitest/coverage-istanbul, I was initially looking to see if there’s any scripts related to test defined in packages/clients but there were none.
After searching for istanbul across the codebase, that is when I saw Istanbul word in vitest.config.ts test scripts are defined in the root level’s package.json.

"test": "turbo codegen-tests...