Skip to content

Commit 51b0b0d

Browse files
committed
fix tests
1 parent 56241ad commit 51b0b0d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/normalize-args.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ function normalizeArgs(_args: Partial<IArguments>): NormalizedArguments {
4646
try {
4747
options = getNewOptions(options);
4848
} catch (e) {
49-
console.log(e);
49+
console.error(`JSON Schema Ref Parser: Error normalizing options: ${e}`);
5050
}
5151

52-
if (!options.mutateInputSchema) {
52+
if (!options.mutateInputSchema && typeof schema === "object") {
5353
// Make a deep clone of the schema, so that we don't alter the original object
5454
schema = JSON.parse(JSON.stringify(schema));
5555
}

test/specs/exports.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ describe("json-schema-ref-parser package exports", () => {
8989
"ResolverError",
9090
"ParserError",
9191
"UnmatchedParserError",
92+
"isHandledError",
93+
"JSONParserErrorGroup",
9294
"UnmatchedResolverError",
9395
);
9496
});

0 commit comments

Comments
 (0)