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] test/year_picker_test.test.js and some tests #4824

Merged
merged 3 commits into from
May 26, 2024

Conversation

yuki0410-dev
Copy link
Contributor

name: Migrate year_picker_test.test.js and some tests

Description

Linked issue: #4700

Changes year_picker_test.test.js and some tests ware migrated to ts

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 not sent to the PullRequest network because the pull request is a draft.

Copy link

codecov bot commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.67%. Comparing base (1c8583b) to head (cc867a8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4824   +/-   ##
=======================================
  Coverage   96.67%   96.67%           
=======================================
  Files          28       28           
  Lines        2977     2977           
  Branches     1288     1285    -3     
=======================================
  Hits         2878     2878           
  Misses         99       99           

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

const x = textContents.find(
(year) => parseInt(year.textContent ?? "") === utils.getYear(minDate),
);
expect(x).not.toBeUndefined();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seemed that not was needed to see the subsequent checklist items.

textContents.find(
(year) => parseInt(year.textContent ?? "") === utils.getYear(minDate),
),
).not.toBeUndefined();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seemed that not was needed to see the subsequent checklist items.

textContents.find(
(year) => parseInt(year.textContent ?? "") === utils.getYear(maxDate),
),
).not.toBeUndefined();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seemed that not was needed to see the subsequent checklist items.

@yuki0410-dev yuki0410-dev marked this pull request as ready for review May 26, 2024 00:28
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

+ 256
- 164

100% TSX (tests)

Type of change

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

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.

I have no concerns with this pull request.

Image of Jacob Jacob


Reviewed with ❤️ by PullRequest

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.

Overall the changes look good and the safe access operators added should help avoid exceptions and still provide the correct test coverage. I added one comment regarding considering another approach to the tests, but what you have here should work fine as well. I didn't see any blocking issues. Thanks!

Image of Jonah Jonah


Reviewed with ❤️ by PullRequest

test/year_dropdown_options_test.test.tsx Show resolved Hide resolved
@martijnrusschen
Copy link
Member

Nice work!

@martijnrusschen martijnrusschen merged commit 7b55232 into Hacker0x01:main May 26, 2024
6 checks passed
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