Skip to content

Commit 84259da

Browse files
committed
fix: unit test, remove logs
1 parent 722df10 commit 84259da

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

jest.config.functional.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import config from './jest.config'
22

3-
config.modulePathIgnorePatterns = ['<rootDir>/test/unit', '<rootDir>/test/integration']
4-
console.log('RUNNING FUNCTIONAL TESTS')
3+
config.modulePathIgnorePatterns = ['<rootDir>/test/unit', '<rootDir>/test/integration'](
4+
'RUNNING FUNCTIONAL TESTS'
5+
)
56

67
export default config

src/collections/infra/repositories/CollectionsRepository.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,6 @@ export class CollectionsRepository extends ApiRepository implements ICollections
267267
return transformMyDataResponseToCollectionItemSubset(response)
268268
})
269269
.catch((error) => {
270-
console.error('Error in getMyDataCollectionItems:', error)
271-
console.log('Error response:', error.response)
272270
throw error
273271
})
274272
}

src/collections/infra/repositories/transformers/collectionTransformers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ export const transformCollectionItemsResponseToCollectionItemSubset = (
151151
export const transformMyDataResponseToCollectionItemSubset = (
152152
response: AxiosResponse
153153
): MyDataCollectionItemSubset => {
154-
console.log('response', JSON.stringify(response.data))
155154
const responseDataPayload = response.data.data
156-
const itemsPayload = responseDataPayload.items ?? []
155+
const itemsPayload = responseDataPayload.items
157156
const countPerObjectTypePayload = responseDataPayload[
158157
'dvobject_counts'
159158
] as MyDataCountPerObjectTypePayload

test/unit/collections/GetMyDataCollectionItems.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ describe('GetMyDataCollectionItems', () => {
123123
expect(collectionRepositoryStub.getMyDataCollectionItems).toHaveBeenCalledWith(
124124
testRoleIds,
125125
testCollectionItemTypes,
126+
testPublishingStatuses,
126127
testLimit,
127128
testPage,
128129
testSearchText,

0 commit comments

Comments
 (0)