test: replace tuple casts with structural lifecycle assertions in command specs
Two aggregate-typecheck errors the package-level tsc -b (rootDir=src) never saw: the commands spec's two-tuple as-cast over the lifecycle slice (TS2352, host aggregate) becomes a plain commandId projection, and the fixture spec still read the deleted result member off the pure-admission execute value (TS2339, client aggregate) — the matched bit is now asserted as the whole response shape.
This commit is contained in:
@@ -76,8 +76,8 @@ describe('createFixtureApi commands/skills', () => {
|
||||
for (const line of ['/nope', 'plain text', '/']) {
|
||||
const response = await api.commands.execute(req({ sessionId: sid('fx-alpha'), line }), signal)
|
||||
if (!response.result.ok) throw new Error('execute failed')
|
||||
expect(response.result.value.matched).toBe(false)
|
||||
expect(response.result.value.result).toBeUndefined()
|
||||
// Pure admission value: the matched bit is the whole response shape.
|
||||
expect(response.result.value).toEqual({ matched: false })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user