mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-02-01 17:36:51 +00:00
docs: add chaiConfig note (#3144)
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
This commit is contained in:
parent
6fcba9ba16
commit
c51433d074
@ -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>`
|
||||
|
||||
@ -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).
|
||||
:::
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user