Testing While Developing (Part 5): Collecting Coverage
dev.to·10h·
Discuss: DEV
Flag this post

We’ve reached the final part of this tutorial series! TWD still has many more advanced features — such as function mocking — but with what we’ve covered so far, you already have everything a solid testing tool needs. In this last step, we’ll see how to collect code coverage from your TWD tests and visualize it locally or in CI.

Before You Start

If you’re following along from Part 4, you can continue as is. But if you want to reset your repo or make sure you’re on the correct branch:

# Repo git clone git@github.com:BRIKEV/twd-docs-tutorial.git
git reset --hard
git clean -d -f
git checkout 05-coverage
npm run serve:dev

Instrumenting the Vite App

We’ll use the vite-plugin-istanbul plugin to instrument our code and …

Similar Posts

Loading similar posts...