Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper unit test coverage #40

Closed
wants to merge 1 commit into from

Conversation

vishwamartur
Copy link

@vishwamartur vishwamartur commented Nov 25, 2024

Related to #12

Add unit tests and integrate Jest for 90% code coverage.

  • Add Jest and Update Configuration

    • Add Jest as a dev dependency in package.json.
    • Update the test script to use Jest.
    • Add Jest configuration to package.json.
  • Update GitHub Actions Workflow

    • Add a step to run Jest tests in .github/workflows/node.js.yml.
    • Add a step to generate coverage reports.
  • Add Unit Tests

    • Add unit tests for ApiKey component in source/commands/apiKey.test.tsx.
    • Add unit tests for Login component in source/commands/login.test.tsx.
    • Add unit tests for Logout component in source/commands/logout.test.tsx.
    • Add unit tests for Policy component in source/commands/opa/policy.test.tsx.
    • Add unit tests for Check component in source/commands/pdp/check.test.tsx.
    • Add unit tests for Run component in source/commands/pdp/run.test.tsx.
    • Add unit tests for AuthProvider component in source/components/AuthProvider.test.tsx.
    • Add unit tests for PDPCommand component in source/components/PDPCommand.test.tsx.
  • Update Documentation

    • Add instructions for running tests locally in README.md.
    • Add instructions for writing new tests in README.md.

/claim #12

Related to permitio#12

Add unit tests and integrate Jest for 90% code coverage.

* **Add Jest and Update Configuration**
  - Add Jest as a dev dependency in `package.json`.
  - Update the `test` script to use Jest.
  - Add Jest configuration to `package.json`.

* **Update GitHub Actions Workflow**
  - Add a step to run Jest tests in `.github/workflows/node.js.yml`.
  - Add a step to generate coverage reports.

* **Add Unit Tests**
  - Add unit tests for `ApiKey` component in `source/commands/apiKey.test.tsx`.
  - Add unit tests for `Login` component in `source/commands/login.test.tsx`.
  - Add unit tests for `Logout` component in `source/commands/logout.test.tsx`.
  - Add unit tests for `Policy` component in `source/commands/opa/policy.test.tsx`.
  - Add unit tests for `Check` component in `source/commands/pdp/check.test.tsx`.
  - Add unit tests for `Run` component in `source/commands/pdp/run.test.tsx`.
  - Add unit tests for `AuthProvider` component in `source/components/AuthProvider.test.tsx`.
  - Add unit tests for `PDPCommand` component in `source/components/PDPCommand.test.tsx`.

* **Update Documentation**
  - Add instructions for running tests locally in `README.md`.
  - Add instructions for writing new tests in `README.md`.
Copy link

algora-pbc bot commented Nov 26, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

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

Successfully merging this pull request may close these issues.

1 participant