diff --git a/test/specs/usage/usage.spec.js b/test/specs/usage/usage.spec.js index ba0bdc24..a74be52c 100644 --- a/test/specs/usage/usage.spec.js +++ b/test/specs/usage/usage.spec.js @@ -45,7 +45,7 @@ describe("Usage", () => { expect(parser.$refs.propertyMap).to.deep.equal({ "#/properties/books": - path.abs("specs/usage/definitions/design-library.json") + + path.rel(path.abs("specs/usage/definitions/design-library.json")) + "#/definitions/Books", "#/properties/books/oneOf/0": "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/usage/nodes/reference/book.v1.json", @@ -53,15 +53,15 @@ describe("Usage", () => { "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/usage/nodes/reference/book.v1.json?mid=1", "#/properties/books/oneOf/2": "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/usage/nodes/reference/book.v2.json", - "#/properties/design-library": path.abs( + "#/properties/design-library": path.rel(path.abs( "specs/usage/definitions/design-library.json" - ), + )), "#/properties/design-library/definitions/Books": "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/usage/nodes/reference/books.json", }); }); - it.skip("bundle with no custom roots should track usage of $refs", async () => { + it("bundle with no custom roots should track usage of $refs", async () => { let parser = new $RefParser(); await parser.bundle({ properties: { @@ -82,8 +82,8 @@ describe("Usage", () => { }); expect(parser.$refs.propertyMap).to.deep.equal({ - "#/properties/bar": path.abs("/") + "#/properties/foo", - "#/properties/baz": path.abs("/") + "#/properties/foo/properties/id", + "#/properties/bar": path.rel(path.abs("/")) + "#/properties/foo", + "#/properties/baz": path.rel(path.abs("/")) + "#/properties/foo/properties/id", }); }); });