mirror of
https://github.com/stablyai/orca.git
synced 2026-10-07 16:02:29 +00:00
Default Windows native rebuilds to TrackFileAccess=false while preserving explicit caller preferences. Co-authored-by: B1nh M1nh <43268322+b1nhm1nh@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Neil <neil@stably.ai>
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
import { describe, expect, it } from 'vitest'
|
|
import { disableMsbuildFileTrackingOnWindows } from './msbuild-file-tracking.mjs'
|
|
|
|
describe('disableMsbuildFileTrackingOnWindows', () => {
|
|
it('turns tracking off on Windows when the caller left it unset', () => {
|
|
expect(disableMsbuildFileTrackingOnWindows({ PATH: 'x' }, 'win32')).toEqual({
|
|
PATH: 'x',
|
|
TrackFileAccess: 'false'
|
|
})
|
|
})
|
|
|
|
it.each(['TrackFileAccess', 'trackfileaccess', 'TRACKFILEACCESS', 'tRaCkFiLeAcCeSs'])(
|
|
'preserves explicit %s values without adding a duplicate key',
|
|
(key) => {
|
|
for (const value of ['true', 'false', '']) {
|
|
const env = { [key]: value }
|
|
expect(disableMsbuildFileTrackingOnWindows(env, 'win32')).toBe(env)
|
|
expect(env).toEqual({ [key]: value })
|
|
}
|
|
}
|
|
)
|
|
|
|
it.each(['linux', 'darwin'])('leaves %s hosts alone', (platform) => {
|
|
const env = { PATH: 'x' }
|
|
expect(disableMsbuildFileTrackingOnWindows(env, platform)).toBe(env)
|
|
expect(env).toEqual({ PATH: 'x' })
|
|
})
|
|
})
|