Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(test-utils): support vitest v0.20.x - #7712

Merged
pi0 merged 1 commit into
mainfrom
fix/test-utils-cli
Sep 21, 2022
Merged

fix(test-utils): support vitest v0.20.x#7712
pi0 merged 1 commit into
mainfrom
fix/test-utils-cli

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#13394, resolvesnuxt/nuxt#14975

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Vitest v0.20 added an additional parameter, which we weren't respecting with test-utils. This PR also adds nuxt/test-utils to deps.inline which is required to avoid Vitest was initialized with native Node instead of Vite Node error.

We can drop the workaround if we want to have a hard dependency on vitest 0.20+

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe added bug Something isn't working cli 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage test-utils labels Sep 21, 2022
@danielroe
danielroe requested review from antfu and pi0September 21, 2022 09:15
@danielroedanielroe self-assigned this Sep 21, 2022
@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Sep 21, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitcad8f5a
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/632ad6367f2e78000815041b

Comment threadpackages/test-utils/src/run.ts
pi0
pi0 approved these changes Sep 21, 2022
@pi0pi0 changed the title fix(test-utils): handle vitest v0.20fix(test-utils): support vitest v0.20.xSep 21, 2022
@pi0
pi0 merged commit 0640a6c into mainSep 21, 2022
@pi0
pi0 deleted the fix/test-utils-cli branch September 21, 2022 10:20
@danielroedanielroe mentioned this pull request Oct 9, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't workingcli🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagetest-utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't run vitest tests with @nuxt/test-utils-edge Vitest was initialized with native Node instead of Vite Node

2 participants

@danielroe@pi0