-
Notifications
You must be signed in to change notification settings - Fork 0
fix: explicit jest expect import. #142
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 4d3f46b in 1 minute and 36 seconds. Click for details.
- Reviewed
1217lines of code in94files - Skipped
2files when reviewing. - Skipped posting
41draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/util/email.test.ts:13
- Draft comment:
Good use of explicit import for expect from '@jest/globals'. The normalization tests are clear and concise. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. src/util/social.test.ts:5
- Draft comment:
The tests correctly handle casing and fallback values. Consider adding a comment about the expected behavior for unknown platforms. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. src/util/url.test.ts:15
- Draft comment:
Proper resetting/restoration of environment variables. Code is clear and well-tested. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. src/util/userAsset.test.ts:24
- Draft comment:
Tests for file upload and error handling are comprehensive. Good use of global fetch mocks. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
5. src/util/userData.test.ts:4
- Draft comment:
Clear tests for deep removal of hidden fields. Nicely handled nested objects and arrays. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
6. src/theme/components/Education/Education.test.tsx:11
- Draft comment:
Tests group education and handle empty arrays well. Use of container.firstChild for empty state is a good pattern. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
7. src/theme/components/ResumeTitle/ResumeTitle.test.tsx:22
- Draft comment:
Good check for semantic elements and CSS classes. Consider also checking accessibility attributes if needed. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
8. src/theme/components/RichTextBlock.test.tsx:10
- Draft comment:
The tests for null content and HTML rendering are clear. The style check for images is also nicely implemented. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
9. src/theme/components/Skills/SkillItem.test.tsx:56
- Draft comment:
Comprehensive tests for dialog open/close behavior and disabled state. Consider adding keyboard accessibility tests if feasible. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
10. src/theme/components/Skills/SkillItemView.test.tsx:20
- Draft comment:
Simple and effective tests for conditional rendering depending on description presence. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
11. src/theme/components/Skills/Skills.test.tsx:32
- Draft comment:
Nice use of fake timers to simulate current year. The tests check both grouping and style (maroon color) which is good. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
12. src/theme/components/Skills/SkillsCloud.test.tsx:24
- Draft comment:
Tests properly handle empty array and invalid skills. Use of queryByTestId for missing elements is appropriate. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
13. src/theme/components/Skills/SkillsExperience.test.tsx:50
- Draft comment:
Tests cover grouping by experience and singular/plural year cases. Good edge-case coverage. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
14. src/theme/default/ThemeDefault.test.tsx:26
- Draft comment:
The checks for rendering optional sections are clear. The test verifies both presence and absence of sections correctly. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
15. src/theme/default/ThemeDefaultPDF.test.tsx:47
- Draft comment:
Solid tests that check metadata generation and theme option behavior. Consider adding a comment explaining the significance of showSkillsInWorkExperience. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
16. src/theme/default/components/ResumeHeading.test.tsx:27
- Draft comment:
Well-structured tests for rendering user details, social links, and handling missing fields. The use of regex in matching content is effective. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
17. src/theme/default/components/WorkExperience/PositionSingle.test.tsx:20
- Draft comment:
Tests for rendering position details and handling dates are thorough. Checking 'to Present' is a nice touch. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
18. src/theme/default/components/WorkExperience/PositionsList.test.tsx:45
- Draft comment:
Good tests for handling multiple positions and empty/undefined cases. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
19. src/theme/default/components/WorkExperience/ProjectAccordion.test.tsx:27
- Draft comment:
The accordion behavior tests, including expansion and remaining expanded, are well implemented. Consider a comment about simulating an external button click on the accordion. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
20. src/theme/default/components/WorkExperience/ProjectItem.test.tsx:44
- Draft comment:
Clear tests for grid layout depending on presence of skills. The style check for gridTemplateColumns is precise. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
21. src/theme/default/components/WorkExperience/Projects.test.tsx:20
- Draft comment:
Mocking of child components is handled nicely. Tests for mixed project states are clear. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
22. src/theme/default/components/WorkExperience/WorkExperience.test.tsx:25
- Draft comment:
Comprehensive coverage of work experience rendering, including companies, locations, and positions. Good iterative checks. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
23. src/theme/default/components/pdf/Education.test.tsx:8
- Draft comment:
Tests for grouping education and formatting dates use regex appropriately. Handling of empty array and missing school is well done. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
24. src/theme/default/components/pdf/Header.test.tsx:10
- Draft comment:
Solid tests for PDF header rendering. Make sure tests for user attributes (name, title) are robust against null values. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
25. src/theme/default/components/pdf/Skills.test.tsx:8
- Draft comment:
Clever verification of comma usage and grouping. Checking skills' styling with expected color ensures design consistency. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
26. src/theme/default/components/pdf/WorkExperience.test.tsx:5
- Draft comment:
Tests effectively differentiate between showSkills true/false states. Conditional rendering is verified properly. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
27. src/types/html2pdf.d.ts:1
- Draft comment:
Declaration file is clear and provides the necessary interfaces. No issues noted. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
28. src/util/email.test.ts:1
- Draft comment:
Unit tests for email normalization are straightforward. Good coverage of different cases. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
29. src/util/social.test.ts:1
- Draft comment:
Tests cover known, fallback, and case-insensitive handling. Well done. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
30. src/util/url.test.ts:1
- Draft comment:
Tests effectively simulate different environment variable scenarios. Proper resetting of process.env is used. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
31. src/util/userAsset.test.ts:1
- Draft comment:
Tests for user asset functions are comprehensive including success and error cases. Good use of spyOn and global.fetch. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
32. src/util/userData.test.ts:1
- Draft comment:
Tests for removeHiddenFields correctly handle nested objects and arrays. Clear and concise. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
33. src/util/social.test.ts:1
- Draft comment:
Minor comment: The tests correctly cover the case sensitivity of platform names. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
34. src/util/url.test.ts:1
- Draft comment:
Reiterating: environment variable tests are robust and clean. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
35. src/util/userAsset.test.ts:1
- Draft comment:
Overall, utility tests for user asset management are solid; ensuring error cases throw as expected. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
36. src/util/userData.test.ts:1
- Draft comment:
Good function tests for object sanitization. Handling of arrays and primitives is well-tested. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
37. src/util/email.test.ts:13
- Draft comment:
Overall, the utility tests (normalizeEmail, findUserByNormalizedEmail) provide excellent coverage. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
38. src/util/social.test.ts:6
- Draft comment:
The handling of different platforms using SOCIAL_MEDIA_PLATFORMS is correctly verified. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
39. src/util/url.test.ts:4
- Draft comment:
Nice tests for getBaseUrl, ensuring default and custom URLs work as expected. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
40. src/util/userAsset.test.ts:4
- Draft comment:
Overall, utility tests for user asset management are solid and verify both positive and negative paths. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
41. src/util/userData.test.ts:1
- Draft comment:
The tests for removeHiddenFields clearly show its functionality with nested objects and arrays. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_FK9KdW4ehqj9mHpH
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for submitting a PR! Please review & check the boxes below:
Description
Update: the linter was complaining about Jest types after I converted Cypress to TypeScript. In order to fix the Jest types, I needed to explicitly import
expectfrom the@jest/globalspackage at the top of Jest test files.Steps to Test
Check out PR,
npm ito install deps, thennpm run checkto run all checks locally.Important
Explicitly import
expectfrom@jest/globalsin test files and convert Cypress config and tests to TypeScript.expectfrom@jest/globalsin test files to resolve linter issues.page.test.tsx,Footer.test.tsx,Header.test.tsx, and 100+ other test files.cypress.config.jstocypress.config.ts..jsto.ts.@types/testing-library__jest-domandchaitopackage.json.type: modulefrompackage.json.This description was created by
for 4d3f46b. You can customize this summary. It will automatically update as commits are pushed.