testing/integration.ts view source
(options: StandardIntegrationTestOptions): void import {describe_standard_integration_tests} from '@fuzdev/fuz_app/testing/integration.js'; Standard integration test suite for fuz_app auth routes.
Exercises login/logout, cookie attributes, session security, session
revocation, password change (incl. API token revocation), origin
verification, bearer auth (incl. browser context discard on mutations),
token revocation, cross-account isolation, expired credential rejection,
signup invite edge cases, response body validation, and the middleware
gates each counted route's error map declares (middleware_gate_probes.ts).
Each test group asserts that required routes exist, failing with a descriptive message if the consumer's route specs are misconfigured.
The two signup-invite-edge-case tests call invite_create_action_spec
(admin-gated) over the fixture's session, so consumers wiring signup +
admin actions must thread extra_keeper_roles: [ROLE_ADMIN] through
either default_in_process_suite_options or
`default_cross_process_setup(handle, {extra_keeper_roles:
[ROLE_ADMIN]}). In both modes the fixture's fixture.account` is the
fresh keeper, and the extra-keeper-roles list grants the bootstrapped
keeper additional roles inline (cross-process via _testing_reset's
bootstrap-time seeding; in-process via bootstrap_test_keeper) — no
per-role RPC cost, no offer/accept round-trip. The tests run against
the production open_signup: false default — the cross-process
per-test secondary mint via fixture.create_account() is
invite-gated (keeper drives invite_create before signup) so the
harness doesn't need to flip the setting. Consumers that don't wire
signup or invite_create silently skip these two tests.
options
returns
void throws
Error- at setup time when `options.rpc_endpoints` is empty — the suite hard-fails via `require_rpc_endpoint_path` rather than running tests that would crash mid-suite trying to dispatch `account_verify` / `account_session_*` / `account_token_*`.