fuzzyworld

explodorama / files / test / version.test.ts

version.test.ts

460 B · history · blame

1import { readFileSync } from 'node:fs'
2import { describe, expect, it } from 'vitest'
3import { SIM_VERSION } from '../src/sim/record'
4
5describe('version', () => {
6 // The rules version is SIM_VERSION (shown in the menu); the README states it by hand.
7 it('the README states the current SIM_VERSION', () => {
8 const stated = readFileSync('README.md', 'utf8').match(/^Rules version: \*\*(\d+)\*\*/m)?.[1]
9 expect(Number(stated)).toBe(SIM_VERSION)
10 })
11})