feat(js): m05 game and m06 view with fixtures and tests

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-28 23:45:10 +01:00
co-authored by Claude Sonnet 5.5
parent 08b462d5cc
commit b83f94894e
12 changed files with 1398 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { CELL, view } from '../src/view.js'
import { loadFixture, freeze } from './helpers.js'
test('m06 CELL is 20 pixels', () => assert.equal(CELL, 20))
const fx = loadFixture('m06-view')
fx.cases.forEach((c) =>
test(`m06 ${fx.function}: ${c.name}`, () => assert.deepStrictEqual(view(...freeze(c.args)), c.expected)))