test: add typed test coercion helper

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-12 14:21:31 +09:00
parent 4150092e9a
commit 9c6090a208
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
declare global {
function testCoerce<TValue>(value: TValue): TValue
}
export {}
+2
View File
@@ -11,6 +11,8 @@ const { restoreModuleMocks } = installModuleMockLifecycle(mock)
let environmentSnapshot: NodeJS.ProcessEnv = { ...process.env }
let workingDirectorySnapshot = process.cwd()
globalThis.testCoerce = <TValue>(value: TValue): TValue => value
function cleanupOmoCacheDir(cacheDir: string): void {
rmSync(cacheDir, { recursive: true, force: true })
}