Skip to content

Commit

Permalink
test: extend get by id comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Nov 15, 2024
1 parent 2b6e9c5 commit 900f8aa
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import {
UpwardHierarchyNode
} from '../../../../src/shared/hierarchy/domain/models/UpwardHierarchyNode'
import { Collection } from '../../../../src/collection/domain/models/Collection'
import { CollectionType } from '@/collection/domain/models/CollectionType'

const collectionRepository = new CollectionJSDataverseRepository()

const collectionExpected: Collection = {
id: 'new-collection',
name: 'Scientific Research',
Expand All @@ -24,8 +26,22 @@ const collectionExpected: Collection = {
undefined,
new UpwardHierarchyNode('Root', DvObjectType.COLLECTION, 'root', undefined, undefined, true)
),
inputLevels: undefined
inputLevels: undefined,
type: CollectionType.LABORATORY,
contacts: [
{
email: '[email protected]',
displayOrder: 0
},
{
email: '[email protected]',
displayOrder: 1
}
],
isMetadataBlockRoot: false,
isFacetRoot: false
}

describe('Collection JSDataverse Repository', () => {
before(() => TestsUtils.setup())
beforeEach(() => {
Expand All @@ -40,6 +56,7 @@ describe('Collection JSDataverse Repository', () => {
throw new Error('Collection not found')
}

console.log('collection', collection)
expect(collection).to.deep.equal(collectionExpected)
})
})
Expand Down

0 comments on commit 900f8aa

Please sign in to comment.