Skip to content

Commit f30909e

Browse files
committed
fix: tests now are ok fixed docs of code coverage
1 parent 1ae0701 commit f30909e

8 files changed

Lines changed: 46 additions & 160 deletions

File tree

src/util/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub fn uppercase_first(s: &str) -> String {
1010

1111
pub fn get_mcli_path() -> String {
1212
let home_dir = dirs::home_dir().expect("Couldn't get home directory");
13-
let mcli_path = format!("{}/.mcliUserB", home_dir.display());
13+
let mcli_path = format!("{}/.mcli", home_dir.display());
1414
if !Path::new(&mcli_path).exists() {
1515
fs::create_dir(&mcli_path).expect("Couldn't create mostro-cli directory in HOME");
1616
println!("Directory {} created.", mcli_path);

tests/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This directory contains comprehensive unit and integration tests for the Mostro
2020

2121
3. **`util_misc.rs`** (13 tests)
2222
- Utility function tests
23-
- Path handling (critical `.mcliUserB` change)
23+
- Path check
2424
- String manipulation
2525

2626
4. **`parser_orders.rs`** (11 tests)
@@ -88,7 +88,6 @@ cargo test -- --test-threads=1
8888
- ✅ Colored output and icons (covered in display tests)
8989

9090
### 2. Modified Features
91-
- ✅ Path change: `.mcli``.mcliUserB` (4 tests)
9291
- ✅ Enhanced dispute handling (9 tests)
9392
- ✅ Improved order display (11 tests)
9493
- ✅ Rating system validation (3 tests)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ Comprehensive unit tests have been successfully generated for all changes in thi
2727

2828
## Critical Changes Tested
2929

30-
### 1. Path Migration (⚠️ Breaking Change)
31-
- **Change:** `.mcli``.mcliUserB`
30+
### 1. Path
3231
- **Tests:** 4 dedicated tests
3332
- **File:** `src/util/misc.rs`
3433
- **Impact:** Users will need data migration
@@ -139,9 +138,8 @@ All tests are designed to pass and follow these principles:
139138
4. Tests are maintainable and clear
140139

141140
### For Users
142-
1. Be aware of the `.mcli``.mcliUserB` path change
143-
2. New commands are fully tested and ready to use
144-
3. Enhanced UI features are covered by tests
141+
1. New commands are fully tested and ready to use
142+
2. Enhanced UI features are covered by tests
145143

146144
## Documentation
147145

TEST_SUMMARY.md renamed to tests/TEST_SUMMARY.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,11 @@ Tests for utility functions, particularly the critical path change in `get_mcli_
117117
- `test_uppercase_first_whitespace` - Leading whitespace
118118

119119
##### get_mcli_path Function (4 tests)
120-
- `test_get_mcli_path_returns_valid_path` - Valid path with `.mcliUserB`
120+
- `test_get_mcli_path_returns_valid_path` - Valid path with `.mcli`
121121
- `test_get_mcli_path_is_absolute` - Absolute path verification
122122
- `test_get_mcli_path_consistent` - Consistency across calls
123123
- `test_get_mcli_path_contains_home` - Home directory inclusion
124124

125-
**Key Changes Tested:**
126-
- ⚠️ **CRITICAL:** Path change from `.mcli` to `.mcliUserB`
127-
- Path consistency and validity
128-
- Cross-platform path handling
129-
130125
---
131126

132127
### 4. `tests/parser_orders.rs` (11 tests - 8 new)
@@ -360,27 +355,11 @@ All tests use only existing dependencies:
360355

361356
---
362357

363-
## Critical Path Testing
364-
365-
### Path Change: `.mcli``.mcliUserB`
366-
The most critical change in this diff is the modification to `get_mcli_path()` in `src/util/misc.rs`:
367-
368-
```rust
369-
// OLD: let mcli_path = format!("{}/.mcli", home_dir.display());
370-
// NEW: let mcli_path = format!("{}/.mcliUserB", home_dir.display());
371-
```
372-
373358
**Testing Strategy:**
374359
- 4 dedicated tests verify the new path
375-
- Tests confirm `.mcliUserB` is in the path
376360
- Path consistency across multiple calls verified
377361
- Home directory integration confirmed
378362

379-
**Potential Impact:**
380-
- Users will need to migrate data from `.mcli` to `.mcliUserB`
381-
- Existing installations may break without migration
382-
- Tests ensure the new path is correctly generated
383-
384363
---
385364

386365
## Recommendations
@@ -397,11 +376,6 @@ The most critical change in this diff is the modification to `get_mcli_path()` i
397376
- Add tests for table width calculations
398377
- Test Unicode emoji rendering
399378

400-
### 3. **Documentation:**
401-
- Add migration guide for `.mcli``.mcliUserB` change
402-
- Document breaking changes in CHANGELOG.md
403-
- Add examples of new commands to README.md
404-
405379
---
406380

407381
## Conclusion

0 commit comments

Comments
 (0)