david raistrick
|
84dd17e174
|
test: Firebase mock harness + createCampaign characterization
- src/__mocks__/firebase/*: jest manual mocks (app/auth/firestore)
- src/__mocks__/firebase/_mock-db.js: in-memory DB + call recorder
- src/setupTests.js: jest-dom, env stubs, crypto polyfill, DB reset
- src/App.characterization.test.js: createCampaign -> setDoc path/payload locked
- src/storage/contract.js (renamed from .test.js, helper not suite)
21 tests green (memory 19 + createCampaign 2).
|
2026-06-28 17:59:50 -04:00 |
|
david raistrick
|
12b24eb707
|
M2 (C): storage barrel re-export, App.js imports swapped
- src/storage/index.js: re-exports Firebase SDK
- App.js: imports from ./storage (was firebase/* direct)
- STORAGE=firebase = identical behavior
- dev server compiles clean
Safe refactor proof. Next: per-call-site path-based rewrite for ws adapter.
|
2026-06-28 17:51:39 -04:00 |
|
david raistrick
|
2ee2bba93b
|
M2 (TDD): storage contract test + memory impl
- src/storage/contract.test.js: storage interface spec (19 assertions)
- src/storage/memory.js: in-process impl (Map + EventEmitter)
- src/storage/storage.test.js: runner, memory first
TDD: contract RED first, memory built to satisfy, 19/19 green.
Next impls (ws, firebase) run same contract.
|
2026-06-28 17:18:14 -04:00 |
|
david raistrick
|
9457f48b23
|
ci: local pre-push hook instead of GH Actions (private repo)
- remove .github/workflows/ci.yml
- add .githooks/pre-push: runs npm run test:all
- git config core.hooksPath .githooks (set)
- docs/DEVELOPMENT.md: document local pipeline
Private repo = no free Actions. Revisit when public.
|
2026-06-28 17:16:23 -04:00 |
|
david raistrick
|
fa19913e23
|
ci: add GitHub Actions workflow + dev docs + test:all script
- .github/workflows/ci.yml: runs shared + server tests on push/PR
- docs/DEVELOPMENT.md: setup, run, test, architecture, status
- package.json: test:all script (shared + server suites)
|
2026-06-28 17:14:51 -04:00 |
|
david raistrick
|
0e76fb2fc7
|
M1: backend (Express+ws+better-sqlite3) + integration tests
- server/db.js: SQLite schema mirroring Firestore doc tree
- server/handlers.js: action -> shared turn fn -> tx persist -> broadcast
- server/index.js: REST endpoints + WebSocket real-time push
- server/server.test.js: 7 integration tests (REST CRUD + combat flow)
- --forceExit for jest (open WS handles)
Backend boots, serves state, persists to SQLite.
|
2026-06-28 17:01:53 -04:00 |
|
david raistrick
|
e06adaa081
|
M1: shared turn logic + characterization tests (39 green)
- npm workspaces: shared/, server/
- shared/turn.js: port turn logic verbatim from App.js (bugs preserved)
- 39 characterization tests lock current behavior
- gitignore: sqlite data, logs
|
2026-06-28 16:57:43 -04:00 |
|
david raistrick
|
d679c9d1e9
|
docs: restore approved milestone plan (backend=M1, drop FSM-extract milestone)
|
2026-06-28 16:53:18 -04:00 |
|
david raistrick
|
ad7979d8fd
|
docs: add rework plan (backend-first, test-ecosystem baseline)
|
2026-06-28 16:47:48 -04:00 |
|