docs: add chaiConfig note (#3144)

Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
This commit is contained in:
btea 2023-04-06 21:52:09 +08:00 committed by GitHub
parent 6fcba9ba16
commit c51433d074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -498,6 +498,10 @@ type Awaitable<T> = T | PromiseLike<T>
})
```
::: tip
If the value in the error message is too truncated, you can increase [chaiConfig.truncateThreshold](/config/#chaiconfig-truncatethreshold) in your config file.
:::
## toMatchObject
- **Type:** `(received: object | array) => Awaitable<void>`

View File

@ -284,6 +284,10 @@ You cannot use this syntax, when using Vitest as [type checker](/guide/testing-t
If you want to have access to `TestContext`, use `describe.each` with a single test.
::: tip
Vitest processes `$values` with chai `format` method. If the value is too truncated, you can increase [chaiConfig.truncateThreshold](/config/#chaiconfig-truncatethreshold) in your config file.
:::
::: warning
You cannot use this syntax, when using Vitest as [type checker](/guide/testing-types).
:::