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

Function assertScanError

src/vs/base/test/common/json.test.ts:18–23  ·  view source on GitHub ↗
(text: string, expectedKind: SyntaxKind, scanError: ScanError)

Source from the content-addressed store, hash-verified

16 assert.strictEqual(kinds.length, 0);
17}
18function assertScanError(text: string, expectedKind: SyntaxKind, scanError: ScanError): void {
19 const scanner = createScanner(text);
20 scanner.scan();
21 assert.strictEqual(scanner.getToken(), expectedKind);
22 assert.strictEqual(scanner.getTokenError(), scanError);
23}
24
25function assertValidParse(input: string, expected: any, options?: ParseOptions): void {
26 const errors: ParseError[] = [];

Callers 1

json.test.tsFile · 0.85

Calls 4

createScannerFunction · 0.90
scanMethod · 0.65
getTokenMethod · 0.65
getTokenErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…