nuxt / nuxt/test-utils

The "setup" in the tests is very slow for every rerun

Open
#314 13 comments 27 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
437
Forks
120
Avg merge
22h 52m
Merged PRs (30d)
23

Description

Environment
  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.0
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -
Reproduction

https://stackblitz.com/edit/nuxt-framework-zehqm6

Describe the bug

The empty await setup({}) in the tests takes ~4 seconds for every rerun in watch mode in the empty project.
Please, check the reproduction, try to run npm test.

Additional context

No response

Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StackBlitz reproduction and run npm test in watch mode, focusing on the empty await setup({}) described in the issue. Trace which test setup entry points are rerun and measure the roughly four-second delay; done means the empty project’s setup reruns substantially faster without changing its behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, nuxtjs, typescript, vite
Domain
performance, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.