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

Function expectStringOrNull

test/contract/p4-schema.test.ts:129–132  ·  view source on GitHub ↗
(v: unknown, label: string)

Source from the content-addressed store, hash-verified

127}
128
129function expectStringOrNull(v: unknown, label: string) {
130 if (v === null) return;
131 expect(typeof v, label).toBe('string');
132}
133
134function validateTestCode(value: unknown, label = 'TestCode'): void {
135 expect(value, `${label}: must be an object`).toBeTypeOf('object');

Callers 3

validateTestCodeFunction · 0.70
validateTestStepFunction · 0.70
validateLatestResultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected