mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
24 lines
721 B
TypeScript
24 lines
721 B
TypeScript
|
import AssetModel from '../../src/models/Asset'
|
||
|
import { MetaDataDexFreight } from '../../src/@types/MetaData'
|
||
|
|
||
|
describe('AssetModel', () => {
|
||
|
it('values can be reassigned', () => {
|
||
|
const newMeta: MetaDataDexFreight = {
|
||
|
main: Object.assign(AssetModel.main, {
|
||
|
name: 'Hello'
|
||
|
}),
|
||
|
additionalInformation: Object.assign(AssetModel.additionalInformation, {
|
||
|
supportName: 'Jelly McJellyfish'
|
||
|
}),
|
||
|
curation: Object.assign(AssetModel.curation, {
|
||
|
numVotes: 100,
|
||
|
rating: 5
|
||
|
})
|
||
|
}
|
||
|
|
||
|
expect(newMeta).toMatchObject(AssetModel)
|
||
|
expect(newMeta.main.name).toBe('Hello')
|
||
|
expect(newMeta.additionalInformation.supportName).toBe('Jelly McJellyfish')
|
||
|
})
|
||
|
})
|