test(acp): pin Windows-native snapshot paths
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
refreshFixtureReplacements,
|
||||
restorePinnedToolSchemas,
|
||||
stabilizeRefreshLog,
|
||||
stdoutGoldenVariants,
|
||||
unknownToolCallIds,
|
||||
} from '../src/suite.ts'
|
||||
|
||||
@@ -189,6 +190,31 @@ describe('childFixturePaths', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('stdoutGoldenVariants', () => {
|
||||
const scenario: Scenario = {
|
||||
name: 'windows-native',
|
||||
hasModelTurn: true,
|
||||
recorded: true,
|
||||
pinsNativeWindowsStdout: true,
|
||||
}
|
||||
|
||||
it('adds the native sidecar after the shared golden on Windows', () => {
|
||||
expect(stdoutGoldenVariants(scenario, 'win32')).toEqual([
|
||||
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
|
||||
{ file: 'stdout.golden.windows.jsonl', cwdPathMode: 'native' },
|
||||
])
|
||||
})
|
||||
|
||||
it('keeps only the shared golden on other platforms or without the declaration', () => {
|
||||
expect(stdoutGoldenVariants(scenario, 'linux')).toEqual([
|
||||
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
|
||||
])
|
||||
expect(stdoutGoldenVariants({ ...scenario, pinsNativeWindowsStdout: false }, 'win32')).toEqual([
|
||||
{ file: 'stdout.golden.jsonl', cwdPathMode: 'canonical' },
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
describe('fixtureContext', () => {
|
||||
it('reads the fixture header id and cwd', () => {
|
||||
const ctx = fixtureContext('{"type":"session","id":"abc","cwd":"/rec"}\n{"type":"turn/start"}\n')
|
||||
|
||||
Reference in New Issue
Block a user