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

View File

@@ -20,7 +20,7 @@ import {
refreshFixtureReplacements,
scrubRequestHeaders,
stabilizeRefreshLog,
tokenizeSessionFixtureTmpdir,
tokenizeSessionFixtureCwd,
type HarvestedLog,
type NormalizeContext,
} from '@deepseek-ai/dsh-acp-snapshot'
@@ -239,7 +239,7 @@ describe('TypeScript SDK snapshots over the jsonrpc runtime', () => {
await Promise.all(ordered.map(async (log, index) => {
const file = fixtureFiles(scenario)[index]
if (file === undefined) throw new Error(`no fixture path for persisted log ${index}`)
await writeFile(file, scrubRequestHeaders(tokenizeSessionFixtureTmpdir(log.content)))
await writeFile(file, scrubRequestHeaders(tokenizeSessionFixtureCwd(log.content)))
}))
}
@@ -258,7 +258,7 @@ describe('TypeScript SDK snapshots over the jsonrpc runtime', () => {
const existing = expectedContents[index]
const file = files[index]
if (existing === undefined || file === undefined) throw new Error(`no fixture for persisted log ${index}`)
const stable = scrubRequestHeaders(tokenizeSessionFixtureTmpdir(
const stable = scrubRequestHeaders(tokenizeSessionFixtureCwd(
stabilizeRefreshLog(log.content, existing, replacements, actualContext),
))
await writeFile(file, stable)