Testing framework for Deno.
Dentest provides support for grouping tests using
testGroup. Only top-level tests need to be run using the
runAsMain method. The following example shows how to group
tests in this manner:
import {
assertEquals,
testGroup,
Test
} from 'https://deno.land/x/dentest/mod.ts'
testGroup('booleans',
new Test('true is true', () => assertEquals(true, true)),
new Test('false is false', () => assertEquals(false, false)),
testGroup('more boolean tests',
new Test('not true is false', () => assertEquals(!true, false)),
new Test('not false is true', () => assertEquals(!false, true)),
),
).runAsMain();To generate code test coverage, make sure you have access to
the genhtml tool (e.g., via the lcov package on AUR), then
run make coverage in the top-level of the project.
Run make test in the top-level of the project to run the
tests. If you need to see results for tests that passed, run
make test_verbose or deno test instead.