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

Fix uncalled/impotent test functions #2945

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Fix uncalled/impotent test functions #2945

merged 4 commits into from
Feb 23, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Feb 12, 2024

This change is Reviewable

@imnasnainaec imnasnainaec added bug Something isn't working frontend test Size: S Small sized issue labels Feb 12, 2024
@imnasnainaec imnasnainaec self-assigned this Feb 12, 2024
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.90%. Comparing base (179bb36) to head (cbd3de5).

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2945       +/-   ##
===========================================
+ Coverage   72.75%   82.90%   +10.15%     
===========================================
  Files         267       47      -220     
  Lines       10204     4926     -5278     
  Branches     1196      574      -622     
===========================================
- Hits         7424     4084     -3340     
+ Misses       2430      701     -1729     
+ Partials      350      141      -209     
Flag Coverage Δ
backend 82.90% <ø> (+0.12%) ⬆️
frontend ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)


src/components/DataEntry/DataEntryTable/tests/index.test.tsx line 154 at r1 (raw file):

      expect(mockCreateWord).not.toHaveBeenCalled();
      testHandle = testRenderer.root.findByType(NewEntry);
      expect(testHandle).not.toBeNull;

Why is this not useful?

Code quote:

expect(testHandle).not.toBeNull;

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: 11 of 12 files reviewed, all discussions resolved (waiting on @jasonleenaylor)


src/components/DataEntry/DataEntryTable/tests/index.test.tsx line 154 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…

Why is this not useful?

findByType() above will just throw an error if one isn't found, and toBeNull needed (), and we have tests below that will fail iftestHandle is not what it's supposed to be.

@jasonleenaylor
Copy link
Contributor

src/components/DataEntry/DataEntryTable/tests/index.test.tsx line 154 at r1 (raw file):

Previously, imnasnainaec (D. Ror.) wrote…

findByType() above will just throw an error if one isn't found, and toBeNull needed (), and we have tests below that will fail iftestHandle is not what it's supposed to be.

👍

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec enabled auto-merge (squash) February 23, 2024 20:02
@imnasnainaec imnasnainaec merged commit 4979ed8 into master Feb 23, 2024
17 checks passed
@imnasnainaec imnasnainaec deleted the test-functions branch February 23, 2024 20:06
jmgrady pushed a commit that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Size: S Small sized issue test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants