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

[typescript-migration] some tests #4881

Merged
merged 6 commits into from
Jun 10, 2024

Conversation

yuki0410-dev
Copy link
Contributor

@yuki0410-dev yuki0410-dev commented Jun 9, 2024

Description

Linked issue: #4700

Changes

  • migrate src/test/month_test.test.tsx
  • migrate src/test/week_number_test.test.tsx
  • migrate src/test/multi_month_test.test.tsx
  • migrate src/test/min_time_test.test.tsx
  • migrate src/test/multiple_selected_dates.test.tsx

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!

What to expect from this code review:
  • Comments posted to any areas of potential concern or improvement.
  • Detailed feedback or actions needed to resolve issues that are found.
  • Turnaround times vary, but we aim to be swift.

@yuki0410-dev you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 786
- 660

97% TSX (tests)
2% TSX
1% JavaScript

Type of change

Feature - These changes are adding a new feature or improvement to existing code.

Copy link

codecov bot commented Jun 9, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.94%. Comparing base (7231710) to head (3054d56).

Files Patch % Lines
src/index.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4881      +/-   ##
==========================================
- Coverage   96.96%   96.94%   -0.03%     
==========================================
  Files          28       28              
  Lines        3234     3242       +8     
  Branches     1341     1332       -9     
==========================================
+ Hits         3136     3143       +7     
- Misses         94       99       +5     
+ Partials        4        0       -4     

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

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

Looks good to me! These changes seem pretty simple, and I didn't spot any major issues. I did leave a few small suggestions, but nothing critical, particularly in light of most of the changes being to test code.

Image of Ryan Lester <@buu700> Ryan Lester <@buu700>


Reviewed with ❤️ by PullRequest

src/calendar.tsx Show resolved Hide resolved
src/test/min_time_test.test.tsx Outdated Show resolved Hide resolved
src/test/week_number_test.test.tsx Outdated Show resolved Hide resolved
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

The changes to leverage TypeScript more effectively look good overall. I added a note about the use of non-null assertions and in general suggest being cautious with those. They can mask real problems especially when used in tests and could make the tests less useful if the actual code stops providing the variable or data you are asserting should exist. Aside from that I don't see any security or other blocking issues to be concerned about. Thanks!

Image of Jonah Jonah


Reviewed with ❤️ by PullRequest

src/test/week_number_test.test.tsx Outdated Show resolved Hide resolved
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest reviewed the updates made to #4881 up until the latest commit (3054d56). No further issues were found.

Reviewed by:

Image of Jonah Jonah

@martijnrusschen martijnrusschen merged commit 3ca1a7a into Hacker0x01:main Jun 10, 2024
4 of 6 checks passed
@yuki0410-dev yuki0410-dev deleted the feat/4700_ts-jest branch June 10, 2024 22:43
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