From cbbea0b702e8f7d7f16ab4a042df807de447a262 Mon Sep 17 00:00:00 2001 From: Dmitry <43723172+catinbag@users.noreply.github.com> Date: Tue, 15 Sep 2026 08:39:05 +0300 Subject: [PATCH] docs: fix internal links to config options (#11240) Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: Codex --- docs/config/browser/expect.md | 4 ++-- docs/guide/migration/index.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/config/browser/expect.md b/docs/config/browser/expect.md index 42580174c..a3364e102 100644 --- a/docs/config/browser/expect.md +++ b/docs/config/browser/expect.md @@ -53,7 +53,7 @@ available: `resolveScreenshotPath` and `resolveDiffPath`. The directory name used for storing reference screenshots. -This value is passed as `screenshotDirectory` to [`browser.expect.toMatchScreenshot.resolveScreenshotPath`](#browserexpecttomatchscreenshotresolvescreenshotpath) and [`browser.expect.toMatchScreenshot.resolveDiffPath`](#browserexpecttomatchscreenshotresolvediffpath), and used in the default path resolution of `resolveScreenshotPath`. +This value is passed as `screenshotDirectory` to [`browser.expect.toMatchScreenshot.resolveScreenshotPath`](#browser-expect-tomatchscreenshot-resolvescreenshotpath) and [`browser.expect.toMatchScreenshot.resolveDiffPath`](#browser-expect-tomatchscreenshot-resolvediffpath), and used in the default path resolution of `resolveScreenshotPath`. ## browser.expect.toMatchScreenshot.resolveScreenshotPath @@ -101,7 +101,7 @@ receives an object with the following properties: - `screenshotDirectory: string` - The value provided to [`browser.expect.toMatchScreenshot.screenshotDirectory`](#browserexpecttomatchscreenshotscreenshotdirectory), if none is provided, its default value (`__screenshots__`). + The value provided to [`browser.expect.toMatchScreenshot.screenshotDirectory`](#browser-expect-tomatchscreenshot-screenshotdirectory), if none is provided, its default value (`__screenshots__`). - `root: string` diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index 300ae6834..73c85ad56 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -296,7 +296,7 @@ vi.setSystemTime(0) Temporal.Now.instant().epochMilliseconds // 0 (was the real time in v4) ``` -`Temporal` is part of the default set of faked APIs, so it is controlled by [`fakeTimers.toFake`](/config/#faketimers-tofake) and [`fakeTimers.toNotFake`](/config/#faketimers-tonotfake). To keep `Temporal` native, add it to `toNotFake`: +`Temporal` is part of the default set of faked APIs, so it is controlled by [`fakeTimers.toFake`](/config/faketimers#faketimers-tofake) and [`fakeTimers.toNotFake`](/config/faketimers#faketimers-tonotfake). To keep `Temporal` native, add it to `toNotFake`: ```ts vi.useFakeTimers({ toNotFake: ['Temporal'] }) @@ -464,7 +464,7 @@ test('renders', async () => { ## Glob Coverage Thresholds No Longer Inherit `perFile` -`coverage.thresholds.perFile` previously applied to every threshold set, including files matched by glob-pattern thresholds. Glob patterns now control their own per-file checking and no longer inherit the top-level `perFile` — set `perFile` on each glob that needs it. +[`coverage.thresholds.perFile`](/config/coverage#coverage-thresholds-perfile) previously applied to every threshold set, including files matched by glob-pattern thresholds. Glob patterns now control their own per-file checking and no longer inherit the top-level `perFile` — set `perFile` on each glob that needs it. ```ts [vitest.config.ts] export default defineConfig({ @@ -485,7 +485,7 @@ export default defineConfig({ ## Coverage `include` and `exclude` Match More Precisely -[`coverage.include`](/config/coverage#coverage-include) and `coverage.exclude` were matched against absolute paths with picomatch's `contains` option, which matched many more files than intended. Patterns are now matched against each file's path relative to the project root, without `contains`, and a pattern with no glob wildcard is treated as a directory that matches everything inside it: +[`coverage.include`](/config/coverage#coverage-include) and [`coverage.exclude`](/config/coverage#coverage-exclude) were matched against absolute paths with picomatch's `contains` option, which matched many more files than intended. Patterns are now matched against each file's path relative to the project root, without `contains`, and a pattern with no glob wildcard is treated as a directory that matches everything inside it: ```ts [vitest.config.ts] export default defineConfig({ @@ -564,9 +564,9 @@ The `json` and `junit` reporters now write to a file by default instead of print ## `toMatchScreenshot` Now Uses a Dedicated Screenshot Directory Config -Previously, reference screenshots for `toMatchScreenshot` did not correctly respect `browser.screenshotDirectory`. As a result, screenshots were saved in an unintended location when a custom directory was configured. +Previously, reference screenshots for `toMatchScreenshot` did not correctly respect [`browser.screenshotDirectory`](/config/browser/screenshotdirectory). As a result, screenshots were saved in an unintended location when a custom directory was configured. -This has now been fixed by introducing a dedicated option: `browser.expect.toMatchScreenshot.screenshotDirectory`. Its default value is `__screenshots__`. +This has now been fixed by introducing a dedicated option: [`browser.expect.toMatchScreenshot.screenshotDirectory`](/config/browser/expect#browser-expect-tomatchscreenshot-screenshotdirectory). Its default value is `__screenshots__`. - If you did not set `browser.screenshotDirectory`, no changes are required. - If you did set `browser.screenshotDirectory`, you must now explicitly configure the new option: -- 2.51.2