Skip to content

Commit

Permalink
Remove mentions of "callback mode" from docs
Browse files Browse the repository at this point in the history
The notion of callback mode was removed in v4, the remaining references to it in the documentation may confuse users.
  • Loading branch information
ericcornelissen authored Jun 23, 2022
1 parent 91f5254 commit 26a2e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions docs/01-writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Translations: [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/docs/01-writing-tests.md)

Tests are run concurrently. You can specify synchronous and asynchronous tests. Tests are considered synchronous unless you return a promise, an [observable](https://github.com/zenparsing/zen-observable), or declare it as a callback test.
Tests are run concurrently. You can specify synchronous and asynchronous tests. Tests are considered synchronous unless you return a promise or an [observable](https://github.com/zenparsing/zen-observable).

You must define all tests synchronously. They can't be defined inside `setTimeout`, `setImmediate`, etc.

Expand Down Expand Up @@ -73,8 +73,6 @@ test('promises the truth', async t => {

AVA comes with built-in support for [observables](https://github.com/zenparsing/es-observable). If you return an observable from a test, AVA will automatically consume it to completion before ending the test.

*You do not need to use "callback mode" or call `t.end()`.*

```js
test('handles observables', t => {
t.plan(3);
Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/test-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You could do all these things using plain setup functions, but there are tradeof
|---|---
| ⛔️   used for all tests| ✅   can change or skip depending on test
| ⛔️   more overhead for beginners, "some magic"| ✅   easier for beginners, "no magic"
| ✅   supports callback mode, built-in support for observables| ⛔️   must use promises for asynchronous behavior
| ✅   built-in support for observables| ⛔️   must use promises for asynchronous behavior
| ✅   failure has friendly output| ⛔️   errors are attributed to the test
| ✅   corresponding `afterEach` and `afterEach.always` for cleanup| ⛔️   cannot easily clean up

Expand Down

0 comments on commit 26a2e5d

Please sign in to comment.