Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Nov 6, 2023
1 parent 8cfa98f commit 1346f57
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/fragmentarium/domain/archaeology.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { archaeologyFactory } from 'test-support/fragment-fixtures'
import { SiteKey, createArchaeology, toArchaeologyDto } from './archaeology'
import {
createArchaeology,
toArchaeologyDto,
toFindspotDto,
} from './archaeology'
import MuseumNumber, { museumNumberToString } from './MuseumNumber'

const excavationNumber: MuseumNumber = {
Expand All @@ -15,14 +19,14 @@ test('toArchaeologyDto', () => {
expect(toArchaeologyDto(archaeology)).toEqual({
...archaeology,
site: archaeology.site?.name,
findspot: archaeology.findspot ? toFindspotDto(archaeology.findspot) : null,
})
})
test('createArchaeology', () => {
expect(
createArchaeology({
...archaeology,
excavationNumber: excavationNumber,
site: (archaeology.site?.name || '') as SiteKey,
...toArchaeologyDto(archaeology),
excavationNumber,
})
).toEqual(archaeology)
})

0 comments on commit 1346f57

Please sign in to comment.