MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / findError

Function findError

test/compute-engine/latex-syntax/errors.test.ts:51–58  ·  view source on GitHub ↗
(
  expr: MathJsonExpression,
  code: string
)

Source from the content-addressed store, hash-verified

49}
50
51function findError(
52 expr: MathJsonExpression,
53 code: string
54): ErrorExpressionObject {
55 const result = collectErrors(expr).find((error) => errorCode(error) === code);
56 expect(result).toBeDefined();
57 return result!;
58}
59
60describe('Parser Error source offsets', () => {
61 test('raw parser errors identify the original source range for unknown commands', () => {

Callers 1

errors.test.tsFile · 0.85

Calls 3

errorCodeFunction · 0.85
findMethod · 0.80
collectErrorsFunction · 0.70

Tested by

no test coverage detected