Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Mar 6, 2024
1 parent 56241ad commit 51b0b0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/normalize-args.ts
Expand Up @@ -46,10 +46,10 @@ function normalizeArgs(_args: Partial<IArguments>): NormalizedArguments {
try {
options = getNewOptions(options);
} catch (e) {
console.log(e);
console.error(`JSON Schema Ref Parser: Error normalizing options: ${e}`);
}

if (!options.mutateInputSchema) {
if (!options.mutateInputSchema && typeof schema === "object") {
// Make a deep clone of the schema, so that we don't alter the original object
schema = JSON.parse(JSON.stringify(schema));
}
Expand Down
2 changes: 2 additions & 0 deletions test/specs/exports.spec.ts
Expand Up @@ -89,6 +89,8 @@ describe("json-schema-ref-parser package exports", () => {
"ResolverError",
"ParserError",
"UnmatchedParserError",
"isHandledError",
"JSONParserErrorGroup",
"UnmatchedResolverError",
);
});
Expand Down

0 comments on commit 51b0b0d

Please sign in to comment.