Initial Commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* randomNamespace — per-test SurrealDB namespace generator.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a unique SurrealDB namespace identifier safe for parallel test
|
||||
* execution against a shared container. The dashes from `crypto.randomUUID()`
|
||||
* are stripped because SurrealDB identifiers reject `-` outside of quoting.
|
||||
*/
|
||||
export function randomNamespace(): string {
|
||||
return `test_${crypto.randomUUID().replace(/-/g, "_")}`;
|
||||
}
|
||||
Reference in New Issue
Block a user