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

fix(test-utils): detect project root using nuxt.config with .mjs and .cjs extensions - #8855

Merged
pi0 merged 2 commits into
nuxt:mainfrom
HigherOrderLogic:main
Nov 10, 2022
Merged

fix(test-utils): detect project root using nuxt.config with .mjs and .cjs extensions#8855
pi0 merged 2 commits into
nuxt:mainfrom
HigherOrderLogic:main

Conversation

@HigherOrderLogic

@HigherOrderLogicHigherOrderLogic commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

🔗 Linked issue

N/A

❓ 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

When using test-utils with a project that has .mjs config file and no pages folder (ex: doc-driven), user'd have to explicitly set options.rootDir to make vitest works, otherwise it'll throw error.

📝 Checklist

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

@codesandbox

Copy link
Copy Markdown

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

@netlify

netlifyBot commented Nov 9, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit44d9b4f
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/636cb91db9158500080f832c

@danielroedanielroe changed the title fix(test-util): fix .mjs config file edge casefix(test-utils): fix .mjs config file edge caseNov 9, 2022

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@pi0pi0 changed the title fix(test-utils): fix .mjs config file edge casefix(test-utils): detect project root using nuxt.config.mjsNov 10, 2022
Comment threadpackages/test-utils/src/nuxt.ts
@pi0pi0 changed the title fix(test-utils): detect project root using nuxt.config.mjsfix(test-utils): detect project root using nuxt.config with .mjs and .cjs extensionsNov 10, 2022
pi0
pi0 approved these changes Nov 10, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@pi0
pi0 merged commit 62bbb91 into nuxt:mainNov 10, 2022
@pi0pi0 mentioned this pull request Nov 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@HigherOrderLogic@pi0@danielroe