@queuert/redis/conformance
Conformance cases for Redis providers.
$npm install @queuert/redis
Functions2
- createRedisNotifyProviderConformanceContextPrepares the context the redisNotifyProviderConformanceCases run against: a notify adapter per case over a new provider, on channels of its own. The test file still owns the provider's resources and releases them itself.
- createRedisStateProviderConformanceContextExperimentalRedisStateProviderConformanceContext
Types3
- ConformanceTestCaseOne conformance case, to wrap in a test of any test runner. The test file creates the context before the cases (for example in beforeAll) and releases the resources behind it, such as the database, after them.
- NotifyAdapterConformanceContextThe context the notify adapter conformance cases run against, for an adapter of either mode. Create it once, before the cases. Each case creates the adapters it needs from it, and they are closed when the case ends.
- RedisStateProviderConformanceContextExperimentalThe context the redisStateProviderConformanceCases run against. Get it from createRedisStateProviderConformanceContext and pass it to every case unchanged.
Variables3
- redisNotifyProviderConformanceCasesEvery notify adapter contract case, run through createRedisNotifyAdapter over a provider. Run them one per test in your own test file against a context from createRedisNotifyProviderConformanceContext. Works with any test runner.
- redisStateAdapterLockWaitCaseNamesExperimentalState adapter cases that assert a transaction waits on a row another transaction locked. The Redis state adapter never waits: a transaction whose reads changed before it commits runs again, so these cases do not apply to it.
- redisStateProviderConformanceCasesExperimentalThe provider's eval contract followed by every state adapter contract case the Redis state adapter meets, including the checks of its schema write fence, run through createRedisStateAdapter over a provider. Run them one per test in your own test file against a context from createRedisStateProviderConformanceContext. Works with any test runner.