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).
This commit is contained in:
david raistrick
2026-06-28 17:59:50 -04:00
parent 12b24eb707
commit 84dd17e174
8 changed files with 273 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
// TDD: contract = spec. Run against memory first. RED until memory.js built.
'use strict';
const { runStorageContract } = require('./contract.test');
const { runStorageContract } = require('./contract');
const { createMemoryStorage } = require('./memory');
runStorageContract('memory', () => createMemoryStorage());