mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 00:02:41 +00:00
* fix(persistence): identify reused Windows profile-owner processes * fix(persistence): preserve absent-owner recovery without native registry * ci: build Windows registry before native profile identity checks * fix(cli): include native profile-owner dependencies in typecheck * test: register native profile owner test in Windows PR lane * test: use resilient Windows profile-owner cleanup --------- Co-authored-by: m4air <m4air@m4airs-Air.localdomain>
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
import { createRequire } from 'node:module'
|
|
import { expect, it } from 'vitest'
|
|
|
|
const { assertWindowsProcessTreeCreationTime } = createRequire(import.meta.url)(
|
|
'./windows-process-tree-creation-time.cjs'
|
|
)
|
|
|
|
it('rejects a previously patched binary that has table creation times but no synchronous getter', () => {
|
|
expect(() =>
|
|
assertWindowsProcessTreeCreationTime({
|
|
platform: 'win32',
|
|
module: { supportedProcessDataFlags: 7 }
|
|
})
|
|
).toThrow('synchronous identity getter')
|
|
})
|
|
|
|
it('accepts the compiled capability only when both readers are available', () => {
|
|
expect(() =>
|
|
assertWindowsProcessTreeCreationTime({
|
|
platform: 'win32',
|
|
module: { supportedProcessDataFlags: 7, getProcessCreationTime: () => undefined }
|
|
})
|
|
).not.toThrow()
|
|
})
|
|
|
|
it('still rejects a binary without table creation-time support', () => {
|
|
expect(() =>
|
|
assertWindowsProcessTreeCreationTime({
|
|
platform: 'win32',
|
|
module: { getProcessCreationTime: () => undefined }
|
|
})
|
|
).toThrow('CreationTime support')
|
|
})
|
|
|
|
it('does not require Windows native capabilities on another platform', () => {
|
|
expect(() => assertWindowsProcessTreeCreationTime({ platform: 'darwin' })).not.toThrow()
|
|
})
|