Apply the epic's 4 rules to the Node stack test files that consumers currently adapt:
modules/billing/tests/billing.quota.unit.tests.js β the responses.error detail-field assertions depend on ambient NODE_ENV: set/restore an explicit dev-grade env inside the test (rule 3).
modules/billing/tests/billing.unit.tests.js β plan-update test asserts a hardcoded plan id from the default config; pick the plan from the loaded config (or a fixture config) so any plan catalogue passes (rule 1).
modules/organizations/tests/organizations.emailVerification.unit.tests.js + organizations.service.silent.catch.unit.tests.js β org-creation flows execute whatever consumers hook on the org-creation seam; isolate the extension mechanism generically in the test harness so no consumer-named mock is ever needed (rule 2).
modules/invitations/tests/invitations.integration.tests.js β assertions depend on config.invitations.userFacing; make the block install its own value (set β assert β restore) and cover BOTH branches so any consumer default passes (rules 1+3).
- New coverage to absorb: an
organizationAbilities unit suite (admin/user Γ owner/admin/member/no-membership matrix over buildAbilities) β generic policy coverage the stack currently lacks.
DoD: each file green on the bare stack AND under a synthetic consumer profile (config overrides + a module registered on the org-creation seam), per the epic's acceptance.
Scope: validated 2026-08-05
Apply the epic's 4 rules to the Node stack test files that consumers currently adapt:
modules/billing/tests/billing.quota.unit.tests.jsβ theresponses.errordetail-field assertions depend on ambient NODE_ENV: set/restore an explicit dev-grade env inside the test (rule 3).modules/billing/tests/billing.unit.tests.jsβ plan-update test asserts a hardcoded plan id from the default config; pick the plan from the loaded config (or a fixture config) so any plan catalogue passes (rule 1).modules/organizations/tests/organizations.emailVerification.unit.tests.js+organizations.service.silent.catch.unit.tests.jsβ org-creation flows execute whatever consumers hook on the org-creation seam; isolate the extension mechanism generically in the test harness so no consumer-named mock is ever needed (rule 2).modules/invitations/tests/invitations.integration.tests.jsβ assertions depend onconfig.invitations.userFacing; make the block install its own value (set β assert β restore) and cover BOTH branches so any consumer default passes (rules 1+3).organizationAbilitiesunit suite (admin/user Γ owner/admin/member/no-membership matrix overbuildAbilities) β generic policy coverage the stack currently lacks.DoD: each file green on the bare stack AND under a synthetic consumer profile (config overrides + a module registered on the org-creation seam), per the epic's acceptance.
Scope: validated 2026-08-05