import { beforeEach } from 'vitest' import { clearStaffRegistry } from '../src/modules/access/predicates.js' /** * Role predicates called without `req.payload` use the staff collections of the configs built in this process — * what every one of them agrees on. A test file builds many unrelated configs, so each test starts with none: * a test that builds a config and then calls an access function with a bare `{ req: { user } }` sees that config. */ beforeEach(() => { clearStaffRegistry() })