Wrote some tests.
This commit is contained in:
66
README.md
66
README.md
@@ -2,6 +2,68 @@
|
||||
|
||||
This template should help get you started developing with Tauri, React and Typescript in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
## Testing
|
||||
|
||||
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
|
||||
This project uses **nextest** for running tests and **cargo-llvm-cov** for code coverage.
|
||||
|
||||
### Install Tools
|
||||
|
||||
```bash
|
||||
cargo install cargo-nextest cargo-llvm-cov
|
||||
```
|
||||
|
||||
### Run Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
cargo nextest run
|
||||
|
||||
# Run specific module
|
||||
cargo nextest run search_files
|
||||
|
||||
# Run with verbose output
|
||||
cargo nextest run --no-capture
|
||||
```
|
||||
|
||||
### Generate Coverage
|
||||
|
||||
```bash
|
||||
# HTML report (opens in browser)
|
||||
cargo llvm-cov nextest --html --open
|
||||
|
||||
# Terminal output
|
||||
cargo llvm-cov nextest
|
||||
|
||||
# LCOV format (for CI)
|
||||
cargo llvm-cov nextest --lcov --output-path lcov.info
|
||||
|
||||
# Clean coverage data
|
||||
cargo llvm-cov clean
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
- **Nextest config**: `.config/nextest.toml`
|
||||
- **Coverage output**: `target/llvm-cov/html/index.html`
|
||||
|
||||
## Current Coverage (search_files module)
|
||||
|
||||
```
|
||||
Module: commands/search.rs
|
||||
├── Region Coverage: 75.36%
|
||||
├── Function Coverage: 69.05%
|
||||
└── Line Coverage: 72.55%
|
||||
```
|
||||
|
||||
### Available Test Profiles
|
||||
|
||||
```bash
|
||||
# Development (default)
|
||||
cargo nextest run
|
||||
|
||||
# CI with retries
|
||||
cargo nextest run --profile ci
|
||||
|
||||
# Coverage optimized
|
||||
cargo nextest run --profile coverage
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user