nuxt / test-utils

🧪 Test utilities for Nuxt
http://nuxt.com/docs/getting-started/testing
MIT License
323 stars 84 forks source link

Ability to avoid a new nuxt instance for each test file #923

Open acidjazz opened 3 months ago

acidjazz commented 3 months ago

Describe the feature

I have a project where I've written multiple test files, each with their own setup() inside the top describe()

describe('/api/pen', async () => {
  await setup(setupConfig())
...

When I run these tests it creates a nuxt instance for each test file, demonstrated here: https://github.com/fumeapp/bio/actions/runs/10505024117/job/29101731333#step:12:48

I'm not sure if I have this setup incorrectly, or maybe if there was a way to have all test files share the same nuxt instance?

P.S. I am working on a potential GH action version that will run nuxt in the background and allow a possible setup({host: ...}) version, if i get this working i'll share it.

Additional information

Final checks