Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBemis committed Feb 11, 2025
1 parent f03785d commit 7384267
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui-participant/src/hub/documents/DocumentLibrary.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useActiveUser } from 'providers/ActiveUserProvider'
import { mockUseActiveUser } from 'test-utils/user-mocking-utils'
import Api from 'api/api'
import { mockParticipantTask } from 'test-utils/test-participant-factory'
import { mockAnswer } from '@juniper/ui-admin/build/src/test-utils/mocking-utils'

Check failure on line 11 in ui-participant/src/hub/documents/DocumentLibrary.test.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '@juniper/ui-admin/build/src/test-utils/mocking-utils'

jest.mock('providers/PortalProvider', () => ({ usePortalEnv: jest.fn() }))

Expand Down Expand Up @@ -77,7 +78,10 @@ describe('DocumentLibrary', () => {

it('renders associated tasks', async () => {
asMockedFn(Api.listParticipantFiles).mockResolvedValue([
mockParticipantFile('file1.pdf', ['taskId1'])
mockParticipantFile('file1.pdf', [{
...mockAnswer(),
surveyResponseId: 'taskId1'
}])
])

asMockedFn(useActiveUser).mockReturnValue({
Expand Down

0 comments on commit 7384267

Please sign in to comment.