Testing Deno Applications
Write and run tests for Deno apps using the built-in test runner, assertions, and mocking for reliable edge code.
Built-in Testing
Deno ships with a built-in test runner — no extra framework or config needed. Just write tests and run deno test.
Your First Test
Register a test with Deno.test. It takes a name and a function.
Deno.test('adds numbers', () => {
const sum = 2 + 3;
if (sum !== 5) throw new Error('wrong');
});All lessons in this course
- Deno Runtime Essentials
- Module System & Permissions
- Developing Local Deno Apps
- Testing Deno Applications