Skip to content

[GOOD FIRST ISSUE] Add unit tests for DocStripper class #6

Description

@kiku-jw

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

  • Test coverage for core methods
  • Edge cases covered
  • Tests run in CI/CD (future)

Tips

  • Look at examples/before_after.txt for test cases
  • Test both positive and negative cases
  • Mock File objects for web app tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions