Skip to content

馃殌 Setup Jest for Unit Testing聽#66

Description

@naheel0

馃殌 Setup Jest for Unit Testing

Description

We need to add Jest to the project to ensure core functionality works correctly. This will help maintain stability and make it easier to safely update dependencies. The initial focus is on unit tests for the main parser functions and CLI output.

Tasks

  • Install Jest as a dev dependency (npm install --save-dev jest)
  • Add a test script to package.json ("test": "jest")
  • Create a tests/ folder
  • Add a sample test file for the parser function (tests/errParser.test.js)
  • Add optional CLI integration test using execSync
  • Verify tests run successfully with npm test

Expected Outcome

  • Core parsing functions are tested
  • CLI output can be validated through unit/integration tests
  • Automated test framework in place for future contributions

Additional Notes

  • This is a unit test setup only; later we can expand coverage with more tests or snapshots
  • Ensure tests are compatible with CI/CD workflows for Dependabot PRs

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions