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:
co-authored by
Claude Sonnet 5.5
parent
08b462d5cc
commit
b83f94894e
@@ -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)))
|
||||
Reference in New Issue
Block a user