August 15th, 2022

In Deno 1.4 a new flag --coverage for deno test was added to collect test coverage.
In Deno 1.8 support for lcov format was shipped, meaning that we can now easily setup coverage report services.
In this tutorial I will show how to configure Codecov and Github Actions for online coverage report.

Writing tests

Deno provides a convinient built-in API for writing tests.
It also has a special standard module for testing that includes assertion functions and benchmarking.

Let's write a simple test: