From c51433d074d62b473fc8cffbf88e0bf9d2d683ea Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Thu, 6 Apr 2023 21:52:09 +0800 Subject: [PATCH] docs: add `chaiConfig` note (#3144) Co-authored-by: Vladimir Sheremet --- docs/api/expect.md | 4 ++++ docs/api/index.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api/expect.md b/docs/api/expect.md index 67974d5a9..91973c5e1 100644 --- a/docs/api/expect.md +++ b/docs/api/expect.md @@ -498,6 +498,10 @@ type Awaitable = T | PromiseLike }) ``` +::: 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` diff --git a/docs/api/index.md b/docs/api/index.md index 9dd5179cf..90e90d5f2 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -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). ::: -- 2.51.2