Skip to content

Commit

Permalink
fix: remove schema-utils cyc dep
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Mar 27, 2020
1 parent a43527d commit d250f8d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 104 deletions.
100 changes: 1 addition & 99 deletions package-lock.json

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

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"files": [
"build"
],
"dependencies": {
"@open-rpc/meta-schema": "^1.7.3"
},
"devDependencies": {
"@open-rpc/meta-schema": "^1.7.3",
"@open-rpc/schema-utils-js": "^1.12.3",
"@types/jest": "^25.1.0",
"@types/json-schema": "^7.0.3",
"@types/lodash": "^4.14.123",
Expand All @@ -34,7 +35,8 @@
"lodash": "^4.17.11",
"ts-jest": "^25.0.0",
"tslint": "^6.0.0",
"typescript": "^3.3.3333"
"typescript": "^3.3.3333",
"json-schema-ref-parser": "^7.0.1"
},
"keywords": [
"open-rpc",
Expand Down
6 changes: 4 additions & 2 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { parseOpenRPCDocument } from "@open-rpc/schema-utils-js";
import openRpcExamples from "./index";
import { forEach, uniqBy, values } from "lodash";

import refParser from "json-schema-ref-parser";
import { OpenrpcDocument } from "@open-rpc/meta-schema";

describe("meta-schema validates all examples without error", () => {
it("has unique titles for each example", () => {
const vals = values(openRpcExamples);
Expand All @@ -11,7 +13,7 @@ describe("meta-schema validates all examples without error", () => {

forEach(openRpcExamples, (example, name: string) => {
it(`validates the example: ${name}`, async () => {
const result = await parseOpenRPCDocument(example);
const result = await refParser.dereference(example) as OpenrpcDocument;
expect(typeof result).toBe("object");
expect(result.methods.length).toBeGreaterThan(0);
});
Expand Down

0 comments on commit d250f8d

Please sign in to comment.