fix(tests): Standardize test syntax and update testing dependencies
This commit is contained in:
@@ -3,28 +3,22 @@
|
||||
## Current Status
|
||||
- ESM imports/exports fixed with .js extensions
|
||||
- Basic fuzzy matching functionality works
|
||||
- Tests run individually with tsx but fail with pnpm test
|
||||
- Testing infrastructure fixed with @git.zone/tsrun dependency
|
||||
- Test syntax needs standardization (converting from chai-style to SmartExpect syntax)
|
||||
- Using older versions of dependencies
|
||||
|
||||
## Improvement Plan
|
||||
|
||||
### 1. Fix Testing Infrastructure
|
||||
### 1. Testing Improvements
|
||||
|
||||
#### 1.1 Fix Test Runner Configuration
|
||||
- [ ] Investigate why `pnpm test` fails while individual tests run with `tsx` succeed
|
||||
- [ ] Check if `tsrun` command is properly installed and available (current error shows "tsrun: command not found")
|
||||
- [ ] Examine the `tstest` configuration in package.json and update if needed
|
||||
- [ ] Verify that `@git.zone/tstest` dependency is properly installed and configured
|
||||
- [ ] Consider updating the test script to use `tsx` directly if `tstest` continues to be problematic
|
||||
|
||||
#### 1.2 Update Test Syntax and Standards
|
||||
#### 1.1 Update Test Syntax and Standards
|
||||
- [ ] Convert all tests from chai-style syntax (`expect().to.be`) to SmartExpect syntax (`expect().toBeInstanceOf()`)
|
||||
- [ ] Implement consistent test structure across all test files
|
||||
- [ ] Add proper setup and teardown patterns where needed
|
||||
- [ ] Replace console.log statements with proper assertions to validate results
|
||||
- [ ] Add descriptive error messages to assertions to improve test debugging
|
||||
|
||||
#### 1.3 Expand Test Coverage
|
||||
#### 1.2 Expand Test Coverage
|
||||
- [ ] Add tests for empty dictionaries and edge cases
|
||||
- [ ] Test with extremely large dictionaries to verify performance
|
||||
- [ ] Add tests for unicode/special character handling
|
||||
@@ -32,13 +26,6 @@
|
||||
- [ ] Add tests for error conditions and input validation
|
||||
- [ ] Implement tests for all public APIs and features
|
||||
|
||||
#### 1.4 Test Automation and CI
|
||||
- [ ] Add test coverage reporting
|
||||
- [ ] Set up continuous integration for automated testing
|
||||
- [ ] Add performance regression tests
|
||||
- [ ] Create test fixtures for consistent test data
|
||||
- [ ] Add browser-based tests for web compatibility
|
||||
|
||||
### 2. Code Quality Improvements
|
||||
- [ ] Add proper TypeScript documentation comments to all public methods
|
||||
- [ ] Implement consistent error handling
|
||||
|
Reference in New Issue
Block a user