mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
23 lines
783 B
TypeScript
23 lines
783 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { parseInboundFrame } from '../../src/transport/frames.ts'
|
|
|
|
describe('tunnel init frame', () => {
|
|
it('retains the selected overlay order', () => {
|
|
expect(parseInboundFrame({
|
|
t: 'init',
|
|
image: 'base.tar.gz',
|
|
overlays: ['workspace.tar.gz', 'session.tar.gz'],
|
|
})).toEqual({
|
|
t: 'init',
|
|
image: 'base.tar.gz',
|
|
overlays: ['workspace.tar.gz', 'session.tar.gz'],
|
|
})
|
|
})
|
|
|
|
it('rejects a missing or non-string overlay list', () => {
|
|
expect(() => parseInboundFrame({ t: 'init', image: 'base.tar.gz' })).toThrow(/array of string overlay urls/)
|
|
expect(() => parseInboundFrame({ t: 'init', image: 'base.tar.gz', overlays: [1] }))
|
|
.toThrow(/array of string overlay urls/)
|
|
})
|
|
})
|