Before running tests, ensure you have:
- Node.js (version 16+ recommended)
- npm or Yarn installed
- Project dependencies installed (
npm install
)
Run all tests using:
npm test
To run only filesystem-related tests:
npm test test/unit/filesystem/
- Audio format detection
- Directory scanning
- File information extraction
- Symlink handling
- Error scenario testing
- Mixed file type directory scanning
- Multi-file audiobook grouping
- Complex file naming pattern handling
- Metadata-based path generation
- Metadata scenario handling
- Path sanitization
-
Filesystem Scanning
- Open application
- Browse and select audiobook directory
- Verify:
- Progress bar updates
- Correct file detection
- File list accuracy
-
File Processing
- Scan directory
- Click "Process Files"
- Check:
- Progress tracking
- Status messages
- Processing summary
-
Metadata Search
- Use metadata search input
- Search variations:
- Full book titles
- Partial titles
- Author names
- Validate:
- Search progress
- Result display
- Error handling
Create a test directory with:
- Single audiobook files
- Multi-file audiobook sets
- Various naming conventions
- Mixed file types
test-audiobooks/
├── single-book.mp3
├── series-book1.mp3
├── series-book2.mp3
├── complex-book-part1.m4b
├── complex-book-part2.m4b
└── non-audio/
├── document.txt
└── image.jpg
- Verify dependency installation
- Check console logs
- Confirm test directory permissions
- Logs stored in
<user-data-directory>/logs/
- Enable development mode for verbose logging
- Create test file in
test/unit/filesystem/
- Follow existing test structure
- Add new scenarios
- Validate with tests
- Large libraries may process slowly
- Monitor memory usage during scanning
Include:
- Reproduction steps
- Log files
- System details:
- OS
- Node.js version
- App version
- Use mock data
- Implement robust error handling
- Address edge cases