Skip to content

DX: Set up basic testing infrastructure (Vitest + @nuxt/test-utils) #8

@TusharW4ni

Description

@TusharW4ni

Context / Problem

Currently, there are no test libraries installed or configured. For a university template, it is important to encourage testing (like TDD) early. Without the infrastructure pre-configured, students are unlikely to write tests.

Proposed Solution

Add @nuxt/test-utils and vitest to establish a baseline testing setup.

Implementation Details

  1. Install the testing dependencies:
    pnpm add -D vitest @vue/test-utils @nuxt/test-utils
  2. Add a vitest.config.ts if required by the Nuxt testing docs.
  3. Add a basic example test in a tests/ directory (e.g., tests/auth.test.ts or an example component test) to serve as a reference.
  4. Add a test script to package.json: "test": "vitest".

Acceptance Criteria

  • Vitest and Nuxt Test Utils are installed and configured.
  • pnpm run test executes successfully.
  • At least one example test exists to guide students.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions