Files
stablyai--orca/config/scripts/marine-creatures-parity.test.mjs
2026-07-13 13:05:33 +08:00

17 lines
587 B
JavaScript

import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
function readCreatureNames(path) {
const source = readFileSync(path, 'utf8')
return Array.from(source.matchAll(/^ '([^']+)',?$/gm), (match) => match[1])
}
describe('marine creature corpus mirrors', () => {
it('keeps the mobile mirror in parity with the shared corpus', () => {
const sharedNames = readCreatureNames('src/shared/marine-creatures.ts')
const mobileNames = readCreatureNames('mobile/src/constants/marine-creatures.ts')
expect(mobileNames).toEqual(sharedNames)
})
})