Skip to content

Function: runAdapterTests() ​

ts
function runAdapterTests(
   name, 
   factory, 
   options?
): void;

Defined in: packages/core/src/testing.ts:58

Registers a full describe block that checks an adapter honours the RbacAdapter contract. factory is called before every test and must return an adapter backed by EMPTY storage.

Parameters ​

ParameterType
namestring
factory() => | RbacAdapter | Promise<RbacAdapter>
options?AdapterTestOptions

Returns ​

void

Released under the MIT License. Inspired by spatie/laravel-permission.