Skip to content

Commit

Permalink
fix: bump traverse
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Apr 9, 2024
1 parent e73b135 commit ca9060e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@json-schema-tools/reference-resolver": "^1.2.5",
"@json-schema-tools/traverse": "^1.10.0",
"@json-schema-tools/traverse": "^1.10.3",
"fast-safe-stringify": "^2.1.1"
}
}
13 changes: 13 additions & 0 deletions src/index.test.ts
@@ -1,3 +1,4 @@
import {inspect} from 'util';

Check warning on line 1 in src/index.test.ts

View workflow job for this annotation

GitHub Actions / lint

'inspect' is defined but never used
import Dereferencer, { NonStringRefError } from "./index";
import { Properties, JSONSchemaObject, JSONSchema } from "@json-schema-tools/meta-schema";

Expand Down Expand Up @@ -406,3 +407,15 @@ describe("custom protocol handling", () => {
expect(r.title).toBe(ref)
});
});


describe("openrpc metaschema", () => {

it("can deref it", async () => {
const ref = "https://meta.open-rpc.org/";
const dereferencer = new Dereferencer({ $ref: ref });
const r = await dereferencer.resolve() as JSONSchemaObject;

expect(r.title).toBe('openrpcDocument');
});
});

0 comments on commit ca9060e

Please sign in to comment.