MCPcopy
hub / github.com/microsoft/vscode / assertValidParse

Function assertValidParse

src/vs/base/test/common/json.test.ts:25–33  ·  view source on GitHub ↗
(input: string, expected: any, options?: ParseOptions)

Source from the content-addressed store, hash-verified

23}
24
25function assertValidParse(input: string, expected: any, options?: ParseOptions): void {
26 const errors: ParseError[] = [];
27 const actual = parse(input, errors, options);
28
29 if (errors.length !== 0) {
30 assert(false, getParseErrorMessage(errors[0].error));
31 }
32 assert.deepStrictEqual(actual, expected);
33}
34
35function assertInvalidParse(input: string, expected: any, options?: ParseOptions): void {
36 const errors: ParseError[] = [];

Callers 1

json.test.tsFile · 0.85

Calls 3

parseFunction · 0.90
getParseErrorMessageFunction · 0.90
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…