144 files moved with git mv (pure renames). Root package.json delegates dev/typecheck/test:run/lint/build to the packages; Node 24 LTS and pnpm 10.13.1 pinned (.nvmrc, .node-version, engines, packageManager, root devDependency, engine-strict). Dockerfile builds @faunosteo/app on node:24-alpine and copies apps/app/dist; nginx and runtime config unchanged. CI workflow for Gitea Actions. packages/ reserved (README only). Docs synced: WORKSPACE.md, CLAUDE.md, README, DEPLOY, CHANGELOG, plan. 271/271 tests, typecheck, lint, build green from the root.
25 lines
860 B
TypeScript
25 lines
860 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { getSpecies, getAllSpecies } from '@/domain/species/registry'
|
|
|
|
describe('species registry', () => {
|
|
it('returns the equine manifest', () => {
|
|
const eq = getSpecies('equine')
|
|
expect(eq).toBeDefined()
|
|
expect(eq?.labelFr).toBe('Cheval')
|
|
expect(eq?.labelEn).toBe('Horse')
|
|
expect(eq?.mainSvg).toBe('/species/equine/Horse.svg')
|
|
expect(eq?.details.head).toBe('/species/equine/Horse_head.svg')
|
|
expect(eq?.vertebralFormula).toEqual({ C: 7, T: 18, L: 6, S: 5, Cd: 18 })
|
|
})
|
|
|
|
it('returns undefined for unknown species', () => {
|
|
expect(getSpecies('martian')).toBeUndefined()
|
|
})
|
|
|
|
it('lists at least the equine species', () => {
|
|
const all = getAllSpecies()
|
|
expect(all.length).toBeGreaterThanOrEqual(1)
|
|
expect(all.find((s) => s.id === 'equine')).toBeDefined()
|
|
})
|
|
})
|