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:
david raistrick
2026-06-28 18:12:27 -04:00
parent 84dd17e174
commit b6555648ee
3 changed files with 151 additions and 41 deletions
+1 -1
View File
@@ -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) }),