Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 2 commits into from Nov 10, 2022
Merged

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

merged 2 commits into from Nov 10, 2022

Conversation

HigherOrderLogic
Copy link
Contributor

@HigherOrderLogic HigherOrderLogic commented Nov 9, 2022

πŸ”— 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

codesandbox bot commented Nov 9, 2022

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

@netlify
Copy link

netlify bot commented Nov 9, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 44d9b4f
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/636cb91db9158500080f832c

@danielroe danielroe changed the title fix(test-util): fix .mjs config file edge case fix(test-utils): fix .mjs config file edge case Nov 9, 2022
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Thanks!

@pi0 pi0 changed the title fix(test-utils): fix .mjs config file edge case fix(test-utils): detect project root using nuxt.config.mjs Nov 10, 2022
@pi0 pi0 changed the title fix(test-utils): detect project root using nuxt.config.mjs fix(test-utils): detect project root using nuxt.config with .mjs and .cjs extensions Nov 10, 2022
Copy link
Member

@pi0 pi0 left a comment

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:main Nov 10, 2022
@pi0 pi0 mentioned this pull request Nov 15, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to 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.

None yet

3 participants