test(shared): remove unsafe test assertions

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-12 14:22:51 +09:00
parent f05aeaa63a
commit 8b093a1115
6 changed files with 36 additions and 37 deletions
+8 -5
View File
@@ -216,20 +216,23 @@ Body content`
agent: string
}
interface FrontmatterWithExtras extends MinimalMeta {
extra_field: string
another_extra: { nested: string; array: string[] }
custom_boolean: boolean
custom_number: number
}
// when
const result = parseFrontmatter<MinimalMeta>(content)
const result = parseFrontmatter<FrontmatterWithExtras>(content)
// then
expect(result.data.description).toBe("Test command")
expect(result.data.agent).toBe("build")
expect(result.body).toBe("Body content")
// @ts-expect-error - accessing extra field not in MinimalMeta
expect(result.data.extra_field).toBe("should not fail")
// @ts-expect-error - accessing extra field not in MinimalMeta
expect(result.data.another_extra).toEqual({ nested: "value", array: ["item1", "item2"] })
// @ts-expect-error - accessing extra field not in MinimalMeta
expect(result.data.custom_boolean).toBe(true)
// @ts-expect-error - accessing extra field not in MinimalMeta
expect(result.data.custom_number).toBe(42)
})