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
- Install the testing dependencies:
pnpm add -D vitest @vue/test-utils @nuxt/test-utils
- Add a
vitest.config.ts if required by the Nuxt testing docs.
- 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.
- Add a
test script to package.json: "test": "vitest".
Acceptance Criteria
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-utilsandvitestto establish a baseline testing setup.Implementation Details
vitest.config.tsif required by the Nuxt testing docs.tests/directory (e.g.,tests/auth.test.tsor an example component test) to serve as a reference.testscript topackage.json:"test": "vitest".Acceptance Criteria
pnpm run testexecutes successfully.