Skip to content

πŸ”§ Node test suite β€” config-agnostic assertions + generic extension-point isolationΒ #4020

Description

@PierreBrisorgueil

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions