Skip to content

docs: fix dependent example spelling#10017

Open
Rohan5commit wants to merge 1 commit intovitest-dev:mainfrom
Rohan5commit:rohan/20260329-fix-dependent-example
Open

docs: fix dependent example spelling#10017
Rohan5commit wants to merge 1 commit intovitest-dev:mainfrom
Rohan5commit:rohan/20260329-fix-dependent-example

Conversation

@Rohan5commit
Copy link
Copy Markdown
Contributor

Summary

Fix the spelling of dependent in the test.extend documentation example.

Related issue

N/A. This is a trivial docs-only fix.

Guideline alignment

Validation/testing

Not run. This is a docs-only change.

AI assistance disclosure

Codex assisted with identifying and correcting this typo; the change was reviewed before submission.

Copilot AI review requested due to automatic review settings March 29, 2026 03:13
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 29, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a2d43b6
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69c898be163dba00084f38cf
😎 Deploy Preview https://deploy-preview-10017--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the spelling of the dependent fixture name in the test.extend / test.override documentation example.

Changes:

  • Renames dependantdependent in the test.override example code and inline comment.
  • Updates the example’s destructured fixture parameter and expectation to use the corrected name.

Comment on lines 300 to +304

test('uses scoped value', ({ dependant }) => {
// `dependant` uses the new overridden value that is scoped
test('uses scoped value', ({ dependent }) => {
// `dependent` uses the new overridden value that is scoped
// to all tests in this suite
expect(dependant).toEqual({ dependency: 'new' })
expect(dependent).toEqual({ dependency: 'new' })
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this example, dependency is a string fixture ('default' / overridden to 'new') and dependent returns dependency directly, so dependent will be 'new' (a string). The current assertion expects an object { dependency: 'new' }, which doesn't match the shown fixtures. Either update the assertion to compare against 'new', or change the dependent fixture to return an object (and adjust the override accordingly).

Copilot uses AI. Check for mistakes.
@sheremet-va sheremet-va added the maybe automated User is likely an AI agent, or the content was generated by an AI assistant without user control label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maybe automated User is likely an AI agent, or the content was generated by an AI assistant without user control

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants