Description
Currently, there are no automated tests for the DocStripper class. Adding tests would help ensure reliability and prevent regressions.
Task
Create unit tests for:
isPageNumber() method
isHeaderFooter() method
processText() method
- Edge cases (empty files, single line, etc.)
Testing Framework
- JavaScript: Jest or Mocha
- Python: pytest or unittest
Files to Create
tests/test_docstripper.js (for web app)
tests/test_tool.py (for CLI)
Acceptance Criteria
Tips
- Look at
examples/before_after.txt for test cases
- Test both positive and negative cases
- Mock File objects for web app tests
Description
Currently, there are no automated tests for the DocStripper class. Adding tests would help ensure reliability and prevent regressions.
Task
Create unit tests for:
isPageNumber()methodisHeaderFooter()methodprocessText()methodTesting Framework
Files to Create
tests/test_docstripper.js(for web app)tests/test_tool.py(for CLI)Acceptance Criteria
Tips
examples/before_after.txtfor test cases