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

Ensure to reopen associated issue if a terms becomes inaccessible again #1065

Merged
merged 6 commits into from
Mar 28, 2024

Conversation

Ndpnt
Copy link
Member

@Ndpnt Ndpnt commented Mar 20, 2024

Additionally, include missing tests for the GitHub class in the Reporter module

@Ndpnt Ndpnt requested review from MattiSG and clementbiron March 20, 2024 14:08
@Ndpnt Ndpnt force-pushed the fix-reopening-issue branch from d5d52e1 to 56ec6a6 Compare March 20, 2024 15:14
Copy link
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

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

Congratulations for creating a sorely missing test suite for what has grown into an important part of the workflow! 👏

Here are some suggestions that are valid for the whole suite, aiming at decreasing the code size:

  1. Remove all white box testing (typically spy functions checking that a search was made on the list of issues, which is an implementation detail we shouldn't care about).
  2. Move all tested functions from before to the it body.
  3. It seems all tested cases have only 1 to 2 test functions (once suggestion 1 above is applied), mostly checking that an API call was made and sometimes checking for return value. I suggest merging these functions into 1 single test function, enabling replacing the repeated after(nock.cleanall) by a single afterEach call at the beginning of the test suite.
  4. Use a shared fixture for issue data to avoid repeating the data setup.

Ndpnt and others added 3 commits March 25, 2024 10:11
Co-authored-by: Matti Schneider <matti@opentermsarchive.org>
@Ndpnt Ndpnt requested a review from MattiSG March 26, 2024 13:43
@Ndpnt Ndpnt merged commit 2bf81aa into main Mar 28, 2024
9 checks passed
@Ndpnt Ndpnt deleted the fix-reopening-issue branch March 28, 2024 08:21
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.

3 participants