MCPcopy Create free account
hub / github.com/denoland/std / assertInvalidParse

Function assertInvalidParse

jsonc/parse_test.ts:20–31  ·  view source on GitHub ↗
(
  text: string,
  // deno-lint-ignore no-explicit-any
  ErrorClass: new (...args: any[]) => Error,
  msgIncludes?: string,
)

Source from the content-addressed store, hash-verified

18}
19
20function assertInvalidParse(
21 text: string,
22 // deno-lint-ignore no-explicit-any
23 ErrorClass: new (...args: any[]) => Error,
24 msgIncludes?: string,
25) {
26 assertThrows(
27 () => parse(text),
28 ErrorClass,
29 msgIncludes,
30 );
31}
32
33Deno.test({
34 name: "parse() handles single line comment",

Callers 4

fnFunction · 0.90
fnFunction · 0.90
fnFunction · 0.70
parse_test.tsFile · 0.70

Calls 2

assertThrowsFunction · 0.90
parseFunction · 0.90

Tested by

no test coverage detected