Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Oct 25, 2024
1 parent b2b683f commit 2860465
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/middleware/issueDetails.middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ describe('issueDetails.middleware.js', () => {
params: requestParams,
// middleware supplies the below
entryNumber: 1,
entityCount: { entity_count: 3 },
entityCount: { entity_count: 1 },
issueEntitiesCount: 1,
pageNumber: 1,
orgInfo,
dataset,
entryData,
issues,
resource: { resource: requestParams.resourceId },
entryNumberCount: 1,
issuesByEntryNumber: {
1: [
{
Expand All @@ -65,7 +66,6 @@ describe('issueDetails.middleware.js', () => {
issues.forEach(issue => {
vi.mocked(performanceDbApi.getTaskMessage).mockReturnValueOnce(`mockMessageFor: ${issue.entry_number}`)
})
vi.mocked(performanceDbApi.getTaskMessage).mockReturnValueOnce('mock task message 1')

prepareIssueDetailsTemplateParams(req, {}, () => {})

Expand All @@ -79,11 +79,10 @@ describe('issueDetails.middleware.js', () => {
dataset: 'mock-dataset',
collection: 'mock-collection'
},
errorHeading: 'mockMessageFor: 0',
errorHeading: undefined,
issueItems: [
{
html: 'mock task message 1 in record 1',
href: '/organisations/test-lpa/test-dataset/test-issue-type/test-issue-field/1'
html: 'mockMessageFor: 0'
}
],
entry: {
Expand Down Expand Up @@ -146,6 +145,7 @@ describe('issueDetails.middleware.js', () => {
entryData,
issues,
resource: { resource: requestParams.resourceId },
entryNumberCount: 1,
issuesByEntryNumber: {
1: [
{
Expand Down

0 comments on commit 2860465

Please sign in to comment.