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 last batch of jest tests #6582

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Aug 8, 2024

As title

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

The pull request focuses on simplifying test setups by removing unnecessary mocks and providers, adding RecoilRoot wrappers, and enhancing test cases for better coverage and reliability.

  • /packages/twenty-front/src/modules/activities/hooks/__tests__/useActivities.test.tsx: Simplified test setup by replacing GraphQL query mocks with Jest mocks for useActivityTargetsForTargetableObjects and useFindManyRecords.
  • /packages/twenty-front/src/modules/activities/timelineActivities/hooks/__tests__/useTimelineActivities.test.tsx: Added RecoilRoot wrapper to ensure proper Recoil context during testing.
  • /packages/twenty-front/src/modules/activities/timelineActivities/utils/__tests__/filterOutInvalidTimelineActivities.test.ts: Enhanced test cases to cover scenarios with multiple metadata items and validate filtering logic.
  • /packages/twenty-front/src/modules/activities/timelineActivities/utils/filterOutInvalidTimelineActivities.ts: Added a comment clarifying shared field metadata for Note and Task objects.
  • /packages/twenty-front/src/modules/object-record/relation-picker/hooks/__tests__/useMultiObjectSearch.test.tsx: Removed Apollo Client's MockedProvider and RecoilRoot, directly mocking custom hooks used within useMultiObjectSearch.

5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@Weiko Weiko merged commit a0e5ca4 into main Aug 8, 2024
6 of 12 checks passed
@Weiko Weiko deleted the tt-last-batch-of-broken-jest-tests branch August 8, 2024 13:53
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