CheckOps
Deno Test
deno test is Deno's built-in test runner, with Deno.test, test steps, hooks, filtering, sanitizers, mocking and snapshots via the standard library, coverage, documentation tests and affected-test selection.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
Deno, the JavaScript and TypeScript runtime, includes a test runner invoked with deno test. Tests are registered with Deno.test(), and Deno also supports the node:test API; its documentation explains the differences between them. TypeScript works without configuration, and Deno’s permission model applies to tests, so a test that needs network access must be granted it explicitly.
The documentation covers test steps for structuring tests, timeouts, retrying and repeating tests, parameterised tests, test hooks, filtering, running only tests affected by your git changes or by specific files, ignoring and focusing tests, sanitizers that detect leaked resources and pending async operations, mocking and snapshots through the standard library (@std/testing, @std/expect), coverage with deno coverage, documentation tests that type-check and run code examples, and a guide to migrating from Jest. Deno is MIT-licensed.
Running deno test with permissions such as --allow-net or --allow-read keeps tests honest about what they touch, and the same deno.json tasks and import maps used by the app apply to tests, so there is no separate test configuration to keep in sync.
Features
- Built in:
deno testwith TypeScript and no setup. - Sanitizers: Catch leaked resources, ops and exits.
- Affected tests: Run only tests affected by git changes or specific files.
- Doc tests and coverage: Test code examples in documentation and report coverage.
Pros
- Free: Included with Deno at no cost.
- Secure by default: Tests respect Deno’s permission model.
Cons
- Requires Deno: Node.js-only projects need a different runner.
- Ecosystem differences: Some npm testing libraries need compatibility checks.
Usage and Links (Example)
// math_test.ts
import { assertEquals } from "jsr:@std/assert";
import { add } from "./math.ts";
Deno.test("add", () => {
assertEquals(add(2, 3), 5);
});
Deno.test("grouped", async (t) => {
await t.step("handles zero", () => assertEquals(add(0, 0), 0));
});
deno test
deno test --coverage=cov && deno coverage cov
Resources:
Pricing
Free and open source as part of Deno (MIT licence).
Recommended for?
- Deno projects wanting a zero-config runner.
- Teams that value sanitizers to catch leaks in async code.
Conclusion
deno test is a capable, secure-by-default runner with sanitizers, steps, doc tests and coverage built into the Deno toolchain.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Deno Test side by side.
NNode.js Test Runner (node:test)The Node.js test runner is the built-in `node:test` module, stable since Node.js 20, providing describe/it tests, mocking, snapshots, coverage and reporters with no extra dependencies.Compare with Deno Test
BBun Test Runnerbun test is Bun's fast, built-in, Jest-compatible test runner with TypeScript and JSX support, lifecycle hooks, mocks, snapshots, DOM testing, coverage, watch mode and GitHub Actions annotations.Compare with Deno Test
JJestJest is a free, open-source JavaScript test runner with zero-config defaults, mocks, and snapshot testing.Compare with Deno Test
VVitestVitest is a free, open-source unit test runner that reuses a Vite project's config, transforms, and plugins.Compare with Deno Test
MMochaMocha is a long-running, MIT-licensed JavaScript test framework for Node.js and browsers, with BDD and TDD interfaces, async support, hooks, parallel mode and a large reporter ecosystem.Compare with Deno Test
AAVAAVA is an MIT-licensed Node.js test runner that runs test files concurrently in separate worker processes, with a minimal API, clean output, built-in assertions and snapshot support.Compare with Deno Test