MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / expectRequired

Function expectRequired

test/contract/p5-schema.test.ts:59–67  ·  view source on GitHub ↗
(
  value: Record<string, unknown>,
  required: ReadonlyArray<string>,
  label: string,
)

Source from the content-addressed store, hash-verified

57}
58
59function expectRequired(
60 value: Record<string, unknown>,
61 required: ReadonlyArray<string>,
62 label: string,
63) {
64 for (const field of required) {
65 expect(field in value, `${label}: missing required field "${field}"`).toBe(true);
66 }
67}
68
69function expectStringOrNull(v: unknown, label: string) {
70 if (v === null) return;

Callers 4

validateFixTargetFunction · 0.70
validateEvidenceFunction · 0.70
validateFailureBlockFunction · 0.70
validateFailureContextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected