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

test(unit): setup jest, add tests + gh workflow #71

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

kahboom
Copy link
Contributor

@kahboom kahboom commented Apr 9, 2024

Summary

Hello, as previously discussed via Slack this PR addresses the lack of unit tests for the Rekor search UI. I didn't want to add any linting changes, in case it wasn't wanted, however, I've added a GitHub action that will automatically run unit tests for each pull request opened.

  • Adds Jest and related libraries for testing
  • Adds unit test coverage of approx 84% (though I've not added Codecov as it requires a bit of setup and rights in the repo)
  • Adds a GitHub action to run unit tests for each pull request
  • Adds a test-specific TS config file to allow types for mock files
  • Fixes a warning about nested anchor links in Material UI by adding as

Release Note

NONE

Documentation

  • Updates README to include steps to run tests
screen capture

@kahboom kahboom requested a review from a team as a code owner April 9, 2024 17:00
test(unit): add tests for components

test(unit): fix Intoto001 test

test(unit): fix Explorer test

test(unit): fix Settings test

test(unit): fix SearchForm

fix issue with userEvent

fix issue with nested anchor links

test(unit): add test for decode

increase coverage for decode

ci(test): add workflow to run unit tests for pull requests

fix: allow isolatedModules for tests to support typed mocks

remove ts disabling for tests

Signed-off-by: kahboom <[email protected]>
Copy link
Contributor

@bdehamer bdehamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for tackling this @kahboom!

@bdehamer bdehamer merged commit 93ff6d5 into sigstore:main Apr 30, 2024
7 checks passed
kahboom added a commit to kahboom/rekor-search-ui that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants