fuzzyworld

explodorama / files / test / version.test.ts

version.test.ts

Blame: the commit that last changed each line · file · history

0b25f1ef 2026-10-24 Pavel Safronov1import { readFileSync } from 'node:fs'
2import { describe, expect, it } from 'vitest'
3import { SIM_VERSION } from '../src/sim/record'
4
5describe('version', () => {
5607bea2 2026-10-31 Pavel Safronov6 // The rules version is SIM_VERSION (shown in the menu); the README states it by hand.
0b25f1ef 2026-10-24 Pavel Safronov7 it('the README states the current SIM_VERSION', () => {
5607bea2 2026-10-31 Pavel Safronov8 const stated = readFileSync('README.md', 'utf8').match(/^Rules version: \*\*(\d+)\*\*/m)?.[1]
0b25f1ef 2026-10-24 Pavel Safronov9 expect(Number(stated)).toBe(SIM_VERSION)
10 })
11})