Skip to main content

Module fixture

Module fixture 

Source
Expand description

Fixture system: dependency-injected, scoped, auto-teardown.

Built-in fixtures: browser (worker scope), context (test scope), page (test scope). Custom fixtures can depend on built-ins and each other, forming a DAG.

Uses lock-free DashMap for fixture values — zero contention on concurrent reads.

Structs§

FixtureDef
Definition of a fixture.
FixturePool
Runtime cache of instantiated fixtures with scoped lifecycle management.

Enums§

FixtureScope
Fixture lifecycle scope.

Functions§

builtin_fixtures
Built-in fixture definitions for the ferridriver test runner.
validate_dag
Validate that fixture definitions form a DAG (no cycles).

Type Aliases§

SetupFn
Async setup function: receives the FixturePool (to resolve deps), returns the value.
TeardownFn
Async teardown function: receives the Arc value to clean up.