This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.
This directory contains tests for the Boom Landing Page application.
unit/
: Contains unit tests for individual components and modulesstacksConnect.spec.ts
: Tests for the Stacks wallet connection functionality
You can run the tests using the following npm scripts:
# Run tests in watch mode
pnpm test
# Run tests once
pnpm test:unit
# Run tests with coverage
pnpm test:coverage
- Unit Tests: Test individual functions and components in isolation.
- Mocking: External dependencies should be mocked.
- Coverage: Aim for high test coverage, especially for critical functionality.
When adding new tests:
- Create a new test file in the appropriate directory with the
.spec.ts
extension. - Import Vitest utilities and the code to be tested.
- Organize tests using
describe
andit
blocks. - Use assertions with
expect
.
- Vitest - Test runner and framework
- Vue Test Utils - Vue component testing utilities
- Happy DOM - DOM implementation for testing