Skip to content

Commit

Permalink
fix test suite for new '-d DELIM' tests for node >=12
Browse files Browse the repository at this point in the history
In node 12 the default Error `toString` changed to include
the stack.
  • Loading branch information
trentm committed Apr 26, 2021
1 parent 4a69ea3 commit 0672aad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function parseArgv(argv) {
parsed.delim = _parseString(outputDelim);
} catch (parseErr) {
throw new Error(format('could not parse delim "%s": %s',
outputDelim, parseErr));
outputDelim, parseErr.message));
}
break;
case '-D':
Expand Down
4 changes: 2 additions & 2 deletions test/output-delim/expected.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# unsupported JavaScript-only escapes in -d DELIM
json: error: could not parse delim "\0": SyntaxError: Unexpected number in JSON at position 2
json: error: could not parse delim "\x2c": SyntaxError: Unexpected token x in JSON at position 2
json: error: could not parse delim "\0": Unexpected number in JSON at position 2
json: error: could not parse delim "\x2c": Unexpected token x in JSON at position 2

0 comments on commit 0672aad

Please sign in to comment.