docs: list globs used by `deno test` (#9976)

This commit is contained in:
yw662 2021-04-07 03:52:56 -07:00 committed by GitHub
parent 26c8d824d1
commit de64183883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,12 @@
Deno has a built-in test runner that you can use for testing JavaScript or
TypeScript code.
`deno test` will search in `./*` and `./**/*` recursively, for test files:
- named `test.{ts, tsx, js, mjs, jsx}`,
- or ending with `.test.{ts, tsx, js, mjs, jsx}`,
- or ending with `_test.{ts, tsx, js, mjs, jsx}`
## Writing tests
To define a test you need to call `Deno.test` with a name and function to be