test(snapshot): canonicalize generated cwd tokens

This commit is contained in:
Tianyi Cui
2026-07-28 23:46:01 +08:00
parent 4cf7603be4
commit c3d9f132e8
99 changed files with 153 additions and 157 deletions
@@ -7,7 +7,7 @@ import {
refreshFixtureReplacements,
scrubRequestHeaders,
stabilizeRefreshLog,
tokenizeSessionFixtureTmpdir,
tokenizeSessionFixtureCwd,
type HarvestedLog,
type NormalizeContext,
} from '@deepseek-ai/dsh-acp-snapshot'
@@ -261,7 +261,7 @@ describe('headless stream-json snapshots', () => {
if (existing === undefined || file === undefined) {
throw new Error(`headless snapshot has no fixture for persisted log ${index}`)
}
const stable = tokenizeSessionFixtureTmpdir(
const stable = tokenizeSessionFixtureCwd(
stabilizeRefreshLog(actual.content, existing, replacements, actualContext),
)
await writeFile(file, stable)
@@ -459,7 +459,7 @@ describe('headless stream-json snapshots', () => {
content: actual.content,
}
const replacements = refreshFixtureReplacements([harvested], [expectedSession])
expectedSession = tokenizeSessionFixtureTmpdir(
expectedSession = tokenizeSessionFixtureCwd(
stabilizeRefreshLog(actual.content, expectedSession, replacements, actualContext),
)
await writeFile(ptySessionFixture, expectedSession)