feat(domain): equine legacy importer (packages/anatomy) + generated official equine sheet seed as draft
This commit is contained in:
1 parent
f4682cdba5
commit
52bfc11553
43 files changed
+18466
-33
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
AnatomicalSheetDocumentSchema,
|
||||
validateSheetDocument,
|
||||
} from '@faunosteo/domain'
|
||||
import { importEquineLegacy, renderArtifacts } from '../src'
|
||||
import { loadInput, runImport } from './helpers'
|
||||
|
||||
describe('equine document', () => {
|
||||
it('parses and validates with no error and no warning', async () => {
|
||||
const { document, issues } = await runImport()
|
||||
const parsed = AnatomicalSheetDocumentSchema.parse(document)
|
||||
expect(validateSheetDocument(parsed)).toEqual([])
|
||||
expect(issues).toEqual([])
|
||||
})
|
||||
|
||||
it('is deterministic: same result and same bytes on two runs', async () => {
|
||||
const input = await loadInput()
|
||||
const first = importEquineLegacy(input)
|
||||
const second = importEquineLegacy(input)
|
||||
expect(second).toEqual(first)
|
||||
expect(await renderArtifacts(second)).toEqual(await renderArtifacts(first))
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user