Skip to content

Commit

Permalink
more windows issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Oct 10, 2024
1 parent 7bc8cfc commit 2923193
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/specs/object-source/object-source.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe("Object sources (instead of file paths)", () => {
path.abs("specs/object-source/definitions/definitions.json"),
path.abs("specs/object-source/definitions/name.yaml"),
path.abs("specs/object-source/definitions/required-string.yaml")
];
expect(parser.$refs.paths()).to.have.same.members(expectedPaths);
].sort();
expect(parser.$refs.paths().sort()).to.have.same.members(expectedPaths);
expect(parser.$refs.values()).to.have.keys(expectedPaths);
// Reference equality
expect(api.paths["/people/{name}"].get.responses["200"].schema)
Expand Down
6 changes: 5 additions & 1 deletion test/utils/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ function filesystemPathHelpers () {
* Returns the absolute path of the current working directory.
*/
cwd () {
return nodePath.join(process.cwd(), nodePath.sep);
let file = nodePath.join(process.cwd(), nodePath.sep);
if (isWindows) {
file = file.replace(/\\/g, "/"); // Convert Windows separators to URL separators
}
return file;
}
};

Expand Down

0 comments on commit 2923193

Please sign in to comment.