diff --git a/test/compiler.ts b/test/compiler.ts index e05185c1..07e66cac 100644 --- a/test/compiler.ts +++ b/test/compiler.ts @@ -85,6 +85,10 @@ function runTests (solc, versionText) { } } } + console.log('Expectation is not matching:'); + console.log(`- output: ${JSON.stringify(output)}`); + console.log(`- errorType: ${errorType}`); + console.log(`- message: ${message}`); return false; } @@ -751,7 +755,11 @@ function runTests (solc, versionText) { t.test('compiling standard JSON (invalid JSON)', function (st) { const output = JSON.parse(solc.compile('{invalid')); // TODO: change wrapper to output matching error - st.ok(expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') || expectError(output, 'JSONError', 'Invalid JSON supplied:')); + st.ok( + expectError(output, 'JSONError', 'Line 1, Column 2\n Missing \'}\' or object member name') || + expectError(output, 'JSONError', 'Invalid JSON supplied:') || + expectError(output, 'JSONError', '[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing object key - invalid literal; last read: \'{i\'; expected string literal') + ); st.end(); });