invoke

suspend operator fun invoke(): Value(source)

Returns the value of this fixture, which is implied to be a suite-level fixture.

The fixture's value will be instantiated on first use, then shared on subsequent invocations and across tests. It has a lifetime of the suite it was registered in.

Usage:

Register a suite-level fixture like this:

val repository = testFixture { MyRepository(this) } closeWith { disconnect() }

Use its value in the suite's tests by invoking the fixture like this:

repository().getScore(...)