diff --git a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts index 3909d80cb9..e63bd37b02 100644 --- a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts @@ -197,7 +197,7 @@ function withMigratedEmptyHead(log: readonly SessionEvent[]): readonly unknown[] { type: 'system/message', seq: 2, time: log[1]!.time, surfaceOp: 'append', data: { turn: 1, step: 1, message: { - id: expect.stringMatching(/^v2-to-v3-system-[0-9a-f]{64}$/), + id: expect.stringMatching(/^v2-to-v3-system-[0-9a-f]{64}$/) as unknown, role: 'system', content: [], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, } }, }, @@ -875,7 +875,7 @@ describe('JsonlSessionPersistence: immutable format generations', () => { await expect(ctx.sessionPersistence.open(id, access)).rejects.toMatchObject({ name: 'SessionFormatUnsupportedError', - message: expect.stringContaining('surface before first step'), + message: expect.stringContaining('surface before first step') as unknown, }) await ctx.sessionPersistence.flush() diff --git a/packages/test-support/llm-replay/tests/session-format-corpus.spec.ts b/packages/test-support/llm-replay/tests/session-format-corpus.spec.ts index 50a8aa0486..e8b6b5b65f 100644 --- a/packages/test-support/llm-replay/tests/session-format-corpus.spec.ts +++ b/packages/test-support/llm-replay/tests/session-format-corpus.spec.ts @@ -104,33 +104,35 @@ describe('corpus unsupported policy', () => { const refused = (): never => { throw new SessionFormatUnsupportedMigrationError(refusal.reason) } it('rejects an unlisted migration refusal', () => { - expect(() => assertRestoration('unlisted', 2, refused, undefined)).toThrow('current-format restoration') + expect(() => { assertRestoration('unlisted', 2, refused, undefined) }).toThrow('current-format restoration') }) it('rejects an exception that starts restoring successfully', () => { - expect(() => assertRestoration('supported', 2, () => [], refusal)).toThrow('expected unsupported migration') + expect(() => { assertRestoration('supported', 2, () => [], refusal) }).toThrow('expected unsupported migration') }) it('rejects a changed refusal reason', () => { - expect(() => assertRestoration('changed', 2, refused, { ...refusal, reason: 'different' })).toThrow('exact refusal reason') + expect(() => { assertRestoration('changed', 2, refused, { ...refusal, reason: 'different' }) }).toThrow('exact refusal reason') }) it('rejects corruption masquerading as an unsupported migration', () => { - expect(() => assertRestoration('corrupt', 2, () => { throw new Error(refusal.reason) }, refusal)) + expect(() => { assertRestoration('corrupt', 2, () => { throw new Error(refusal.reason) }, refusal) }) .toThrow('expected unsupported migration') }) it('rejects a mismatched source generation', () => { - expect(() => assertRestoration('wrong-version', 1, refused, refusal)).toThrow('inventoried source generation') + expect(() => { assertRestoration('wrong-version', 1, refused, refusal) }).toThrow('inventoried source generation') }) it('never exempts a current-generation fixture', () => { - expect(() => assertRestoration('current', SESSION_FORMAT_VERSION, refused, { - ...refusal, sourceVersion: SESSION_FORMAT_VERSION, - })).toThrow('current-generation fixtures cannot be unsupported') + expect(() => { + assertRestoration('current', SESSION_FORMAT_VERSION, refused, { + ...refusal, sourceVersion: SESSION_FORMAT_VERSION, + }) + }).toThrow('current-generation fixtures cannot be unsupported') }) it('accepts only the exact typed historical refusal', () => { - expect(() => assertRestoration('historical', 2, refused, refusal)).not.toThrow() + expect(() => { assertRestoration('historical', 2, refused, refusal) }).not.toThrow() }) })