-
Notifications
You must be signed in to change notification settings - Fork 345
feat(content-sharing): Create contact service getContactsAvatarUrls #4345
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
Conversation
WalkthroughA consistent naming refactor across the content-sharing module: Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as ContentSharingV2
participant ContactHook as useContactService
participant AvatarsAPI as fetchAvatars
participant SharingHook as useSharingService
rect rgb(235,245,255)
Note right of UI: On mount / contacts update
UI->>ContactHook: getContactsAvatarUrls(contacts, itemId)
end
rect rgb(245,255,235)
ContactHook->>AvatarsAPI: fetchAvatars({ api, itemId, collaborators })
AvatarsAPI-->>ContactHook: avatarUrlMap
ContactHook-->>UI: avatarUrlMap
end
rect rgb(255,250,230)
Note right of UI: UI passes avatarUrlMap to sharing logic
UI->>SharingHook: useSharingService({ avatarUrlMap, ... })
SharingHook-->>UI: sharingService (uses avatarUrlMap in convertCollab)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/elements/content-sharing/utils/convertCollaborators.ts (1)
9-15: Type-safety: ownerEmailDomain can be null; widen its type.convertCollabsResponse computes ownerEmailDomain as string | null, but ConvertCollabProps requires string. Widen to avoid latent type errors.
export interface ConvertCollabProps { collab: Collaboration; currentUserId: string; isCurrentUserOwner: boolean; - ownerEmailDomain: string; + ownerEmailDomain: string | null; avatarUrlMap?: AvatarURLMap; } … -export const convertCollabsResponse = ( - collabsApiData: Collaborations, +export const convertCollabsResponse = ( + collabsApiData: Collaborations, currentUserId: string, owner: { id: string; email: string; name: string }, avatarUrlMap?: AvatarURLMap, ): Collaborator[] => { - const { entries = [] } = collabsApiData; + const { entries = [] } = collabsApiData;Also applies to: 17-23, 54-61, 78-82
♻️ Duplicate comments (1)
src/elements/content-sharing/hooks/__tests__/useContactService.test.ts (1)
114-152: Optional: if you adopt user-only filtering, update this test accordingly.Should you filter out non-user contacts, adjust the expected collaborators array to include only the user entry.
🧹 Nitpick comments (12)
src/elements/content-sharing/utils/convertItemResponse.ts (1)
8-21: Defensive destructuring to avoid runtime error if shared_link_features is absent.If shared_link_features is undefined, destructuring throws. Use nullish coalescing.
- const { password: isPasswordAvailable } = shared_link_features; + const { password: isPasswordAvailable } = shared_link_features ?? {};Minor readability (optional):
- const isEditAllowed = allowed_invitee_roles.indexOf(INVITEE_ROLE_EDITOR) !== -1; + const isEditAllowed = allowed_invitee_roles.includes(INVITEE_ROLE_EDITOR);src/elements/content-sharing/apis/fetchItem.ts (1)
8-21: LGTM; small optional refactor to reduce duplication.Logic and types look good. Optionally, collapse the two branches with a switch for readability; behavior unchanged.
src/elements/content-sharing/apis/fetchCurrentUser.ts (1)
7-13: Use join(',') for better readability; apply to both source and test files.The suggestion is valid. Both
.toString()and.join(',')produce identical results for arrays, but.join(',')is more explicit and idiomatic for creating comma-separated strings. The same pattern exists in the test file atsrc/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.ts:20, which should also be updated for consistency.Apply the refactor to both files:
src/elements/content-sharing/apis/fetchCurrentUser.ts:11src/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.ts:20src/elements/content-sharing/apis/__tests__/fetchItem.test.ts (2)
41-49: Consider adding a folder-error path test.You cover file error; mirroring one for folders would catch regressions in getFolderFields rejection handling.
5-5: Speed up tests by removing artificial delay in createSuccessMock.The helper currently waits 500ms; this slows the suite. Recommend resolving immediately (or using fake timers) to keep tests fast.
Apply in src/elements/content-sharing/apis/tests/testUtils.ts:
-export const createSuccessMock = responseFromApi => (itemId, successFn) => { - return new Promise(resolve => { - setTimeout(() => { - resolve(responseFromApi); - }, 500); - }).then(response => { - successFn(response); - }); -}; +export const createSuccessMock = responseFromApi => (_itemId, successFn) => { + return Promise.resolve(responseFromApi).then(successFn); +};src/elements/content-sharing/hooks/useContactService.ts (2)
26-47: Filter to user contacts and dedupe before fetching avatars.Fetching avatars for groups is wasteful and may 404; also avoid duplicate user lookups.
- const getContactsAvatarUrls = React.useCallback( - async contacts => { - if (!contacts || contacts.length === 0) return Promise.resolve({}); - - const collaborators = contacts.map(contact => ({ + const getContactsAvatarUrls = React.useCallback( + async (contacts) => { + if (!contacts || contacts.length === 0) return {}; + const userIds = Array.from( + new Set(contacts.filter(c => c?.type === 'user').map(c => c.id)), + ); + const collaborators = contacts + .filter(contact => contact?.type === 'user') + .map(contact => ({ accessible_by: { id: contact.id, is_active: true, login: contact.email, name: contact.name, type: contact.type, }, - })); + })); return fetchAvatars({ api, itemId, collaborators, }); }, [api, itemId], );
11-25: Add explicit TS types to the hook API and return value.Typing improves DX and guards regressions.
-import * as React from 'react'; +import * as React from 'react'; +import type API from '../../../api'; +import type { AvatarURLMap } from '../types'; + +type Contact = { id: string | number; email?: string; name?: string; type: 'user' | 'group' }; -export const useContactService = (api, itemId, currentUserId) => { +export const useContactService = (api: API, itemId: string, currentUserId?: string) => { … - const getContactsAvatarUrls = React.useCallback( - async contacts => { + const getContactsAvatarUrls = React.useCallback( + async (contacts: Contact[] | null | undefined): Promise<AvatarURLMap> => { … }, [api, itemId], ); - return { contactService: { getContactByEmail, getContacts, getContactsAvatarUrls } }; + return { contactService: { getContactByEmail, getContacts, getContactsAvatarUrls } } as const;Also applies to: 26-47, 49-49
src/elements/content-sharing/hooks/__tests__/useContactService.test.ts (2)
41-59: Wrap the hook in an IntlProvider to avoid useIntl crashes.useContactService calls useIntl; without a provider tests can break depending on env. Add a wrapper.
-import { renderHook } from '@testing-library/react'; +import { renderHook } from '@testing-library/react'; +import { IntlProvider } from 'react-intl'; … - const { result } = renderHook(() => useContactService(mockApi, mockItemId, mockCurrentUserId)); + const wrapper = ({ children }) => <IntlProvider locale="en">{children}</IntlProvider>; + const { result } = renderHook(() => useContactService(mockApi, mockItemId, mockCurrentUserId), { wrapper });Repeat for other renderHook calls in this file.
81-91: Make the assertion less brittle than hard-coding 'Group'.Relying on a specific English string can fail with i18n. Prefer any string.
-expect(convertGroupContactsResponse as jest.Mock).toHaveBeenCalledWith(mockGroupData, 'Group'); +expect(convertGroupContactsResponse as jest.Mock).toHaveBeenCalledWith(mockGroupData, expect.any(String));src/elements/content-sharing/utils/convertCollaborators.ts (1)
33-37: Nit: optional chaining for avatarUrlMap access.A tiny readability tweak:
-const avatarUrl = avatarUrlMap ? avatarUrlMap[collabId] : undefined; +const avatarUrl = avatarUrlMap?.[collabId];src/elements/content-sharing/ContentSharingV2.tsx (2)
98-107: Handle fetchItem errors to avoid unhandled rejections.Wrap the await in try/catch and set safe defaults.
- (async () => { - const itemData = await fetchItem({ api, itemId, itemType }); - handleGetItemSuccess(itemData); - })(); + (async () => { + try { + const itemData = await fetchItem({ api, itemId, itemType }); + if (itemData) handleGetItemSuccess(itemData); + } catch { + // no-op: keep item null; optionally log + } + })();
124-129: Same for fetchCurrentUser: guard with try/catch.- (async () => { - const userData = await fetchCurrentUser({ api, itemId }); - getUserSuccess(userData); - })(); + (async () => { + try { + const userData = await fetchCurrentUser({ api, itemId }); + if (userData) getUserSuccess(userData); + } catch { + // keep currentUser null; optionally log + } + })();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
src/elements/content-sharing/ContentSharing.js(1 hunks)src/elements/content-sharing/ContentSharingV2.tsx(7 hunks)src/elements/content-sharing/__tests__/ContentSharingV2.test.tsx(5 hunks)src/elements/content-sharing/apis/__tests__/fetchAvatars.test.ts(5 hunks)src/elements/content-sharing/apis/__tests__/fetchCollaborators.test.ts(3 hunks)src/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.ts(2 hunks)src/elements/content-sharing/apis/__tests__/fetchItem.test.ts(1 hunks)src/elements/content-sharing/apis/__tests__/testUtils.ts(1 hunks)src/elements/content-sharing/apis/fetchAvatars.ts(1 hunks)src/elements/content-sharing/apis/fetchCollaborators.ts(1 hunks)src/elements/content-sharing/apis/fetchCurrentUser.ts(1 hunks)src/elements/content-sharing/apis/fetchItem.ts(1 hunks)src/elements/content-sharing/hooks/__tests__/useContactService.test.ts(5 hunks)src/elements/content-sharing/hooks/__tests__/useSharingService.test.ts(4 hunks)src/elements/content-sharing/hooks/useContactService.ts(2 hunks)src/elements/content-sharing/hooks/useSharingService.ts(2 hunks)src/elements/content-sharing/stories/ContentSharingV2.stories.tsx(1 hunks)src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx(4 hunks)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js(2 hunks)src/elements/content-sharing/utils/__tests__/convertCollaborators.test.ts(11 hunks)src/elements/content-sharing/utils/convertCollaborators.ts(4 hunks)src/elements/content-sharing/utils/convertItemResponse.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-02T16:47:50.715Z
Learnt from: reneshen0328
PR: box/box-ui-elements#4322
File: src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js:30-36
Timestamp: 2025-10-02T16:47:50.715Z
Learning: In src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js, mockCurrentUserID is intentionally a number (789) while DEFAULT_USER_API_RESPONSE.id is a string ('789'). This represents different stages of data transformation: mockCurrentUserID is the raw API response before conversion, and DEFAULT_USER_API_RESPONSE.id is the post-conversion state after fetchCurrentUser processes it.
Applied to files:
src/elements/content-sharing/hooks/__tests__/useSharingService.test.tssrc/elements/content-sharing/apis/__tests__/fetchAvatars.test.tssrc/elements/content-sharing/apis/fetchCurrentUser.tssrc/elements/content-sharing/__tests__/ContentSharingV2.test.tsxsrc/elements/content-sharing/stories/ContentSharingV2.stories.tsxsrc/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.tssrc/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js
📚 Learning: 2025-09-25T22:28:08.867Z
Learnt from: jfox-box
PR: box/box-ui-elements#4285
File: src/elements/content-sharing/ContentSharingV2.tsx:108-118
Timestamp: 2025-09-25T22:28:08.867Z
Learning: In ContentSharingV2, the getUsersAPI().getUser() call should use itemID as the first parameter, not 'me', when fetching user data for content sharing functionality.
Applied to files:
src/elements/content-sharing/apis/fetchCurrentUser.ts
🧬 Code graph analysis (20)
src/elements/content-sharing/hooks/useContactService.ts (2)
src/elements/content-sharing/apis/fetchAvatars.ts (1)
fetchAvatars(3-22)src/elements/content-sharing/ContentSharing.js (1)
api(89-89)
src/elements/content-sharing/apis/fetchCollaborators.ts (2)
src/elements/content-sharing/ContentSharing.js (1)
api(89-89)src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/hooks/__tests__/useSharingService.test.ts (1)
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (2)
mockAvatarUrlMap(30-32)mockAvatarUrlMap(30-32)
src/elements/content-sharing/utils/convertItemResponse.ts (1)
src/elements/content-sharing/sharingService.ts (1)
ItemData(8-14)
src/elements/content-sharing/apis/__tests__/fetchAvatars.test.ts (1)
src/elements/content-sharing/apis/__tests__/testUtils.ts (2)
createSuccessMock(1-9)createUsersApiMock(21-23)
src/elements/content-sharing/apis/fetchCurrentUser.ts (3)
src/elements/content-sharing/apis/index.ts (1)
fetchCurrentUser(3-3)src/elements/content-sharing/ContentSharing.js (1)
api(89-89)src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/utils/convertCollaborators.ts (1)
src/features/presence/PresenceAvatarList.tsx (1)
Collaborator(10-18)
src/elements/content-sharing/__tests__/ContentSharingV2.test.tsx (2)
src/elements/content-sharing/apis/__tests__/testUtils.ts (1)
createSuccessMock(1-9)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (2)
MOCK_ITEM(14-18)MOCK_ITEM(14-18)
src/elements/content-sharing/stories/ContentSharingV2.stories.tsx (2)
src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx (1)
withSharedLink(31-49)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (4)
mockApiWithSharedLink(181-185)mockApiWithSharedLink(181-185)mockApiWithoutSharedLink(186-190)mockApiWithoutSharedLink(186-190)
src/elements/content-sharing/hooks/__tests__/useContactService.test.ts (2)
src/elements/content-sharing/apis/fetchAvatars.ts (1)
fetchAvatars(3-22)src/elements/content-sharing/hooks/useContactService.ts (1)
useContactService(11-50)
src/elements/content-sharing/ContentSharingV2.tsx (6)
src/elements/content-sharing/hooks/useContactService.ts (1)
useContactService(11-50)src/utils/Xhr.js (1)
itemId(242-242)src/elements/content-sharing/apis/fetchItem.ts (1)
fetchItem(8-22)src/elements/content-sharing/apis/fetchCurrentUser.ts (1)
fetchCurrentUser(7-15)src/elements/content-sharing/apis/fetchCollaborators.ts (1)
fetchCollaborators(6-21)src/elements/content-sharing/utils/convertCollaborators.ts (1)
convertCollabsResponse(54-82)
src/elements/content-sharing/apis/__tests__/fetchItem.test.ts (3)
src/elements/content-sharing/apis/__tests__/testUtils.ts (2)
createSuccessMock(1-9)createItemApiMock(11-14)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (4)
DEFAULT_ITEM_API_RESPONSE(93-107)DEFAULT_ITEM_API_RESPONSE(93-107)MOCK_ITEM(14-18)MOCK_ITEM(14-18)src/elements/content-sharing/apis/fetchItem.ts (1)
fetchItem(8-22)
src/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.ts (3)
src/elements/content-sharing/apis/__tests__/testUtils.ts (2)
createSuccessMock(1-9)createUsersApiMock(21-23)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (4)
DEFAULT_USER_API_RESPONSE(86-91)DEFAULT_USER_API_RESPONSE(86-91)MOCK_ITEM(14-18)MOCK_ITEM(14-18)src/elements/content-sharing/apis/fetchCurrentUser.ts (1)
fetchCurrentUser(7-15)
src/elements/content-sharing/apis/fetchItem.ts (2)
src/elements/content-sharing/ContentSharing.js (1)
api(89-89)src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx (1)
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (6)
mockApiWithoutSharedLink(186-190)mockApiWithoutSharedLink(186-190)mockApiWithSharedLink(181-185)mockApiWithSharedLink(181-185)mockApiWithCollaborators(191-195)mockApiWithCollaborators(191-195)
src/elements/content-sharing/utils/__tests__/convertCollaborators.test.ts (2)
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (10)
collabUser1(38-43)collabUser1(38-43)collabUser2(45-49)collabUser2(45-49)collabUser3(51-55)collabUser3(51-55)mockAvatarUrlMap(30-32)mockAvatarUrlMap(30-32)mockOwnerId(36-36)mockOwnerId(36-36)src/elements/content-sharing/utils/convertCollaborators.ts (2)
convertCollab(17-52)convertCollabsResponse(54-82)
src/elements/content-sharing/apis/__tests__/testUtils.ts (1)
src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/apis/fetchAvatars.ts (2)
src/elements/content-sharing/ContentSharing.js (1)
api(89-89)src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (1)
src/utils/Xhr.js (1)
itemId(242-242)
src/elements/content-sharing/apis/__tests__/fetchCollaborators.test.ts (3)
src/elements/content-sharing/apis/__tests__/testUtils.ts (2)
createSuccessMock(1-9)createCollabApiMock(16-19)src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (4)
MOCK_COLLABORATIONS_RESPONSE(65-80)MOCK_COLLABORATIONS_RESPONSE(65-80)MOCK_ITEM(14-18)MOCK_ITEM(14-18)src/elements/content-sharing/apis/fetchCollaborators.ts (1)
fetchCollaborators(6-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: lint_test_build
- GitHub Check: Summary
🔇 Additional comments (20)
src/elements/content-sharing/ContentSharing.js (1)
120-127: Bridge prop rename is correct.Passing itemId={itemID} cleanly adapts the old public prop to the new V2 API without breaking callers.
Confirm ContentSharingV2’s props expect itemId (camelCase) everywhere post‑rename to avoid mixed casing in downstream hooks.
src/elements/content-sharing/stories/ContentSharingV2.stories.tsx (1)
4-22: LGTM! Clean naming refactor.The import and usage of renamed mocks (
mockApiWithSharedLink,mockApiWithoutSharedLink) and the prop rename (itemId) improve consistency with JavaScript/TypeScript camelCase conventions.src/elements/content-sharing/hooks/useSharingService.ts (1)
10-10: LGTM! Parameter rename is consistent.The
avatarUrlMapparameter rename and its usage in theconvertCollabcall are consistent with the codebase-wide naming improvements.Also applies to: 85-85
src/elements/content-sharing/hooks/__tests__/useSharingService.test.ts (1)
61-61: LGTM! Test updated correctly.All test references updated from
avatarURLMaptoavatarUrlMap, maintaining consistency with the implementation changes.Also applies to: 234-234, 240-240, 262-262, 277-277
src/elements/content-sharing/apis/__tests__/fetchCurrentUser.test.ts (1)
4-31: LGTM! Mock naming refactor is consistent.The test utility import and variable renames (
createUsersApiMock,defaultApiMock) along with theitemIdparameter usage maintain consistency across the test suite.src/elements/content-sharing/apis/fetchAvatars.ts (1)
3-21: LGTM! Systematic naming improvements.The parameter and variable renames (
itemId,usersApi,avatarUrlMap) improve code consistency while preserving the function's logic.src/elements/content-sharing/apis/__tests__/fetchCollaborators.test.ts (1)
4-42: LGTM! Test suite updated correctly.The mock factory and variable renames (
createCollabApiMock,defaultApiMock) along with theitemIdparameter usage are consistent throughout the test suite.src/elements/content-sharing/__tests__/ContentSharingV2.test.tsx (1)
18-63: LGTM! Comprehensive test refactor.The mock factory rename (
createApiMock), parameter updates, and prop changes (itemId) are systematically applied throughout the test suite, maintaining consistency with the implementation.src/elements/content-sharing/apis/__tests__/fetchAvatars.test.ts (1)
3-92: LGTM! Test suite fully aligned.All mock references (
createUsersApiMock,defaultApiMock) and theitemIdparameter usage are consistently updated throughout the test suite.src/elements/content-sharing/apis/__tests__/fetchItem.test.ts (1)
5-10: Renames look consistent; mock wiring is correct.createItemApiMock and defaultApiMock usage aligns with fetchItem’s contract; happy path assertions read well.
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js (1)
30-33: LGTM: rename to mockAvatarUrlMap is consistent with avatarUrlMap usage.No issues; keys map to numeric IDs as expected. Based on learnings.
src/elements/content-sharing/utils/__tests__/convertCollaborators.test.ts (1)
16-21: Tests match the renamed API (avatarUrlMap) and cover edge cases well.Inputs/expectations align with convertCollab/convertCollabsResponse behavior; null/undefined avatar maps handled.
Also applies to: 32-62, 186-191
src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx (2)
8-11: LGTM: story imports/args match the renames (mockApi…, itemId).Visual flows should remain unchanged.
Also applies to: 16-17, 33-34, 53-54, 76-77
8-11: Ensure mock API method names match fetchCollaborators.If fetchCollaborators expects getFileCollaborationsAPI/getFolderCollaborationsAPI, confirm mocks export those aliases (see suggested change in ContentSharingV2Mocks.js).
src/elements/content-sharing/ContentSharingV2.tsx (1)
145-163: Avatar fetch effect looks good; minor dependency cleanup.You don’t use sharedLink/itemType here; current deps are correct. No change required.
src/elements/content-sharing/apis/__tests__/testUtils.ts (5)
1-9: LGTM! Naming standardization improves consistency.The parameter renames from
responseFromAPItoresponseFromApianditemIDtoitemIdalign with JavaScript/TypeScript camelCase conventions. The function logic is preserved.
11-14: LGTM! Function and parameter naming standardized.The rename from
createItemAPIMocktocreateItemApiMockand corresponding parameter updates maintain consistency with camelCase conventions. All internal references are correctly updated.
16-19: LGTM! Consistent with the overall refactoring.The function and parameter renames follow the same camelCase standardization pattern, and all references are properly updated.
21-23: LGTM! Completes the naming standardization.The rename from
createUsersAPIMocktocreateUsersApiMockand parameter update complete the systematic refactoring.
1-23: All call sites have been properly updated.The verification confirms no references to the old function names remain in the codebase. The new function names (
createItemApiMock,createCollabApiMock,createUsersApiMock) are correctly imported and used across all test files:fetchItem.test.ts,fetchCurrentUser.test.ts,fetchCollaborators.test.ts, andfetchAvatars.test.ts. The renaming was properly coordinated.
What
Testing
Summary by CodeRabbit
New Features
Chores