framework icon indicating copy to clipboard operation
framework copied to clipboard

implement `setupTimeout` option in test-utils

Open BracketJohn opened this issue 3 years ago • 1 comments

Environment

Nuxt CLI v3.0.0-rc.4-27585508.c9d4b2e                                                                                                                                               12:42:59
RootDir: /app                                                                                                                  
Nuxt project info:                                                                                                                                                                 

------------------------------
- Operating System: `Darwin`
- Node Version:     `v16.14.2`
- Nuxt Version:     `3.0.0-rc.4-27585508.c9d4b2e`
- Package Manager:  `[email protected]`
- Builder:          `vite`
- User Config:      `typescript`, `build`, `nitro`
- Runtime Modules:  `-`
- Build Modules:    `-`
------------------------------

Reproduction

Repo: https://github.com/nuxt/framework

Describe the bug

setupTimeout seems to do nothing, checking the codebase of this repo I cannot find setupTimeout or setupTest anywhere besides in the docs + the options object:

  • setupTimeout: https://github.com/nuxt/framework/search?q=setupTimeout&type=code
  • setupTest: https://github.com/nuxt/framework/search?q=setupTest&type=code

Additional context

Testing using the test-utils takes quite long right now - 30 - 60 seconds of setup time. I wanted to reduce this and one guess of mine was that the setupTimeout can help with that. Upon further investigation I could not find it doing anything.

Let me know if this is actually a flaw, I'd be open to remove this part from the docs or extend code to apply setupTimeout.

Logs

No response

BracketJohn avatar Jun 14 '22 11:06 BracketJohn

cc: @antfu

danielroe avatar Sep 20 '22 12:09 danielroe