Skip to content

Commit

Permalink
docs: add chaiConfig note (#3144)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
  • Loading branch information
btea and sheremet-va committed Apr 6, 2023
1 parent 6fcba9b commit c51433d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api/expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>`
Expand Down
4 changes: 4 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
:::
Expand Down

0 comments on commit c51433d

Please sign in to comment.