Skip to content

Commit

Permalink
fix: bump open-rpc/examples + fix by-name test
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Dec 11, 2020
1 parent b8d14e3 commit 8aedd3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ws": "^7.3.1"
},
"devDependencies": {
"@open-rpc/examples": "^1.6.0",
"@open-rpc/examples": "^1.6.1",
"@open-rpc/meta-schema": "^1.13.20",
"@types/body-parser": "^1.19.0",
"@types/connect": "^3.4.33",
Expand Down
5 changes: 4 additions & 1 deletion src/router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ describe("router", () => {
if (exampleName === "petstoreByName") {
it("handles params by name", async () => {
const router = new Router(parsedExample, makeMethodMapping(parsedExample.methods));
const result = await router.call("list_pets", { limit: 10 });
const result = await router.call("list_pets", { limit: 1 });
expect(result).toBeDefined();
expect(result.result.length).toBeGreaterThan(0);
expect(result.result[0].name).toBe("fluffy");
expect(result.result[0].id).toBe(7);
expect(result.result[0].tag).toBe("poodle");
});
}
if (exampleName === "simpleMath") {
Expand Down

0 comments on commit 8aedd3b

Please sign in to comment.