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:
@@ -0,0 +1,5 @@
|
||||
// jest manual mock: firebase/app
|
||||
const fakeApp = { name: '[fake-firebase-app]', options: {} };
|
||||
export function initializeApp(config) { return fakeApp; }
|
||||
export const getApp = () => fakeApp;
|
||||
export const getApps = () => [fakeApp];
|
||||
Reference in New Issue
Block a user