Skip to content

Commit 58e8c37

Browse files
authored
docs: document __tests__ directory test discovery convention (#3385)
1 parent 234b4f7 commit 58e8c37

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

runtime/test/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified: 2026-06-25
2+
last_modified: 2026-07-02
33
title: "Testing"
44
description: "Write and run tests with Deno's built-in test runner: assertions, test steps, hooks, filtering, and reporters, with dedicated guides for mocking, snapshots, and coverage."
55
oldUrl:
@@ -99,7 +99,9 @@ subcommand.
9999

100100
If run without a file name or directory name, this subcommand will automatically
101101
find and execute all tests in the current directory (recursively) that match the
102-
glob `{*_,*.,}test.{ts, tsx, mts, js, mjs, jsx}`.
102+
glob `{*_,*.,}test.{ts, tsx, mts, js, mjs, jsx}`. Additionally, any script file
103+
inside a directory named `__tests__` is treated as a test file, regardless of
104+
its file name.
103105

104106
```sh
105107
# Run all tests in the current directory and all sub-directories

0 commit comments

Comments
 (0)