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

feat(test-utils): test in development mode#3753

Merged
pi0 merged 5 commits intomainfrom
feat/test-utils-dev2
Mar 17, 2022
Merged

feat(test-utils): test in development mode#3753
pi0 merged 5 commits intomainfrom
feat/test-utils-dev2

Conversation

@pi0
Copy link
Copy Markdown
Member

@pi0 pi0 commented Mar 17, 2022

🔗 Linked issue

Rework of #3693

❓ 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

Allow testing nuxt build in development mode:

  • Add new dev option to test utils
  • Support --dev and --watch to nuxi test
  • Add new isDev() utility from @nuxt/test-utils to check if testing in development environment
  • Directly use nitro server listener
  • (prod) Inherit stdio for process

To be improved: Wating for loading is via a loop to fetch and check payload. We could improve state management (hooks are unreliable for this since both nitro and vite need to be done) (~> #730)

Try: yarn nuxi test examples/with-test --dev

📝 Checklist

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

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 17, 2022

✔️ Deploy Preview for nuxt3-docs canceled.

🔨 Explore the source changes: 709a76a

🔍 Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/6233a76df3cfca0008a995bd

@pi0 pi0 merged commit a50b8ca into main Mar 17, 2022
@pi0 pi0 deleted the feat/test-utils-dev2 branch March 17, 2022 21:31
@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.

2 participants