Skip to content

Commit 71555f6

Browse files
committed
fix: npm lint
1 parent faf2b42 commit 71555f6

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

test/integration/collections/CollectionsRepository.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ describe('CollectionsRepository', () => {
117117
// Root collection might or might not have a theme, but the property should be present if it does
118118
// and we want to ensure the transformer doesn't fail.
119119
// In a default Dataverse installation, root theme is usually undefined or has some default values.
120-
if (actual.theme) {
121-
expect(actual.theme).toHaveProperty('id')
122-
}
120+
const hasNoThemeOrThemeWithId =
121+
actual.theme === undefined || Object.prototype.hasOwnProperty.call(actual.theme, 'id')
122+
123+
expect(hasNoThemeOrThemeWithId).toBe(true)
123124
})
124125
})
125126
describe('by string alias', () => {

test/unit/collections/CollectionsRepository.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ import {
1212
createCollectionFacetRequestPayload,
1313
createCollectionModel,
1414
createCollectionPayload,
15-
createNewCollectionRequestPayload,
15+
createNewCollectionRequestPayload
1616
} from '../../testHelpers/collections/collectionHelper'
1717
import { TestConstants } from '../../testHelpers/TestConstants'
1818
import { ReadError, WriteError } from '../../../src'
19-
import { ROOT_COLLECTION_ID, CollectionTheme } from '../../../src/collections/domain/models/Collection'
19+
import {
20+
ROOT_COLLECTION_ID,
21+
CollectionTheme
22+
} from '../../../src/collections/domain/models/Collection'
2023
import { CollectionThemePayload } from '../../../src/collections/infra/repositories/transformers/CollectionPayload'
2124
import { AllowedStorageDrivers } from '../../../src/collections/domain/models/AllowedStorageDrivers'
2225
import { StorageDriver } from '../../../src/core/domain/models/StorageDriver'

0 commit comments

Comments
 (0)