API reference › @evolu/common › LockManager › testCreateLockManager
function testCreateLockManager(nativeLockManager?: LockManager): LockManager;
Defined in: packages/common/src/LockManager.ts:69
Creates a test LockManager backed by the native platform LockManager.
Native backing is intentional: tests must observe the same locking behavior as the platform runtime, and a userland implementation cannot reproduce it.
The platform LockManager cannot be instantiated, so tests cannot create an
isolated native lock per case. This helper isolates lock usage per instance
via internal namespacing, so tests can reuse the same lock names without
contending through the global Web Locks. Query results are filtered to that
private namespace and returned with the original visible names.