nuxt / nuxt/test-utils

Ability to `setup()` a server-only environment for testing

Open
#921 0 comments 4 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

Describe the feature

Allow the option to only provide server functionality for faster testing in situations where the API is priority for coverage

setup({
  serverOnly: true
})
Additional information
  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?
Final checks

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 at the setup({ serverOnly: true }) entry point in the test-utils package and trace how server and client functionality are initialized. Check the existing setup tests and add coverage showing that server-only mode works for API-focused tests and avoids client setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
api, backend, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.