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

Function expectRequired

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

Source from the content-addressed store, hash-verified

117}
118
119function expectRequired(
120 value: Record<string, unknown>,
121 required: ReadonlyArray<string>,
122 label: string,
123) {
124 for (const field of required) {
125 expect(field in value, `${label}: missing required field "${field}"`).toBe(true);
126 }
127}
128
129function expectStringOrNull(v: unknown, label: string) {
130 if (v === null) return;

Callers 3

validateTestCodeFunction · 0.70
validateTestStepFunction · 0.70
validateLatestResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected