-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
607-fix: Falling test #608
Conversation
π WalkthroughWalkthroughThe pull request modifies the test file for the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
π§Ή Outside diff range and nitpick comments (1)
src/widgets/upcoming-courses/ui/upcoming-courses.test.tsx (1)
65-66
: Mocking simplified. Good job!Direct mocking of
getActualData
improves test clarity.Consider using
vi.fn(() => mockedData)
for brevity:- return { getActualData: vi.fn().mockImplementation(() => mockedData) }; + return { getActualData: vi.fn(() => mockedData) };
π Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
π Files selected for processing (1)
- src/widgets/upcoming-courses/ui/upcoming-courses.test.tsx (2 hunks)
π§° Additional context used
π Additional comments (2)
src/widgets/upcoming-courses/ui/upcoming-courses.test.tsx (2)
90-93
: Improved variable naming and test logic. Nice work!The changes clarify the test's intent and correctly account for the button in the course list.
Regarding the past comment about adding
data-testid
to each card: The current approach is acceptable for a quick fix. Consider addingdata-testid
toCourseCard
in a future refactor for more robust testing.
Line range hint
108-111
: Explicit mock values improve test clarity. Well done!Setting explicit mock return values for
useWindowSize
enhances test readability and maintainability.Also applies to: 122-125
What type of PR is this? (select all that apply)
Description
Fix falling test case
Related Tickets & Documents
Screenshots, Recordings
Added/updated tests?
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
Summary by CodeRabbit
UpcomingCourses
component to improve accuracy.