[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [LockManager](https://evolu.dev/docs/api-reference/common/LockManager) › testCreateLockManager

```ts
function testCreateLockManager(nativeLockManager?: LockManager): LockManager;
```

Defined in: [packages/common/src/LockManager.ts:69](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/LockManager.ts#L69)

Creates a test [LockManager](https://evolu.dev/docs/api-reference/common/LockManager) backed by the native platform
[LockManager](https://evolu.dev/docs/api-reference/common/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.