When updating the dependency from texvcjs 0.3.10 to 0.3.11 the texvcinfo tests fail.
{ column: undefined, details: `SyntaxError: Expected "-", "[", "\\\\", "\\\\begin", "\\\\begin{", "]", "^", "_", "{", [ ,\\t,\\n,\\r], [%,$], [(,),.], [,,:,;,?,!,'], [/,|], [0-9], [>,<,~], [\\-,+,*,=], or [a-z,A-Z] but end of input found.`, line: undefined, offset: undefined, status: 'S' } should loosely deep-equal { column: undefined, details: `SyntaxError: Expected "-", "[", "\\\\", "\\\\begin", "\\\\begin{", "]", "^", "_", "{", [ \\t\\n\\r], [%$], [().], [,:;?!'], [/|], [0-9], [><~], [\\-+*=], or [a-zA-Z] but end of input found.`, line: undefined, offset: undefined, status: 'S' }
- understand why the format is different now:
There is a different serialization of the error class. It seems that peggy has a tostring function that is used whereas peg.js did not have this function.
Moreover, the error.message seems to be missing in the new output.
Additionally, the expected regexp contains additional commata. This seems to be factually wrong.
While the comma problem seems harder to solve the first two problems can be militated via
var message = texvcres.error.message; texvcres.error = JSON.parse(JSON.stringify(texvcres.error)); texvcres.error.message = message;
- check how Math accesses the error information
- adjust test cases or fix problem