test: campaign characterization (7 tests)
- src/testHelpers.js: renderApp, createCampaignViaUI, selectCampaignByName - App.characterization.test.js: createCampaign, addCharacter, updateCharacter, deleteCharacter, deleteCampaign + path namespace + bg url - mock firestore writeBatch sync (was async, app no-await) Locks path + payload shape per action. Refactor guard.
This commit is contained in:
@@ -39,7 +39,7 @@ export async function addDoc(collRef, data) {
|
||||
MOCK_DB.set(path, clone(data));
|
||||
return { id, path };
|
||||
}
|
||||
export async function writeBatch(db) {
|
||||
export function writeBatch(db) {
|
||||
const ops = [];
|
||||
return {
|
||||
set: (r, d) => ops.push({ op: 'set', path: r.path, data: clone(d) }),
|
||||
|
||||
Reference in New Issue
Block a user