GEN-1: export genotypeToFarbschlag for DATA-1 denormalization contract
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
wildType,
|
||||
} from '../genotype'
|
||||
import { combineLocus } from '../punnett'
|
||||
import { farbschlagFor, CATALOG_SIZE } from '../catalog'
|
||||
import { farbschlagFor, genotypeToFarbschlag, CATALOG_SIZE } from '../catalog'
|
||||
import { breed } from '../breed'
|
||||
import { GeneticsWarningCode } from '../warnings'
|
||||
|
||||
@@ -169,6 +169,14 @@ describe('Farbschlag catalog', () => {
|
||||
it('has the expected catalogue coverage', () => {
|
||||
expect(CATALOG_SIZE).toBe(18)
|
||||
})
|
||||
|
||||
it('genotypeToFarbschlag (DATA-1 denormalization contract) returns the plain name', () => {
|
||||
expect(genotypeToFarbschlag(wildType())).toBe('Agouti')
|
||||
expect(genotypeToFarbschlag(fromDisplayString('aa CC DD EE GG pp spsp rere'))).toBe('Platin')
|
||||
expect(genotypeToFarbschlag(fromDisplayString('aa cchmcchm dd ee gg PP spsp rere'))).toBe(
|
||||
'Unbekannter Farbschlag',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('Partially-unknown parents (wildcards)', () => {
|
||||
|
||||
Reference in New Issue
Block a user