https://github.com/aiherrera/testing-vite
https://github.com/aiherrera/testing-vite
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aiherrera/testing-vite
- Owner: aiherrera
- Created: 2023-07-10T03:01:02.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T05:30:48.000Z (almost 2 years ago)
- Last Synced: 2025-03-06T15:08:03.084Z (3 months ago)
- Language: JavaScript
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testing Vite with Vitest
![]()
Welcome to the `testing-vite` repository! This project is dedicated to teaching you how to effectively test Vite applications using the Vitest testing framework.
## About Vite and Vitest
Vite is a modern front-end build tool that provides a faster and leaner development experience for modern web projects. Vitest, on the other hand, is a testing framework designed specifically for Vite. It provides a fast, scalable, and easy-to-use testing solution for Vite applications.
## Getting Started
Before you begin, make sure you have [Node.js](https://nodejs.org/en) and [pnpm](https://pnpm.io/installation) installed on your machine.
To clone and run this project, follow these steps:
```bash
git clone https://github.com/aiherrera/testing-vite.git
cd testing-vite
pnpm install
pnpm run dev
```This will clone the project, install the necessary dependencies, and start the development server.
## Testing
To run the tests, use the following command:
```bash
pnpm run test
```To run in development mode:
```bash
pnpm run test:dev
```To run Vitest UI:
```bash
pnpm run test:ui
```To run test converage:
```bash
pnpm run coverage
```## Learning Resources
This repository contains several examples of tests written with Vitest. Each example is accompanied by comments explaining what the test does and how it works.
We recommend going through the examples in the order they are presented, as each one builds on concepts introduced in the previous examples.
## Contributing
We welcome contributions to this project! If you have a suggestion, bug report, or want to add a new example, please open an issue or submit a pull request.
## License
This project is licensed under the MIT License