Skip to content

Commit 99a06dd

Browse files
Skip some tests when running in Node on Windows when the path contains spaces
1 parent 1d567be commit 99a06dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/specs/error-source/error-source.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
const chai = require("chai");
44
const chaiSubset = require("chai-subset");
55
chai.use(chaiSubset);
6+
67
const { expect } = chai;
78
const $RefParser = require("../../..");
89
const helper = require("../../utils/helper");
910
const path = require("../../utils/path");
11+
const { host } = require("@jsdevtools/host-environment");
1012
const { InvalidPointerError, ResolverError, MissingPointerError } = require("../../../lib/util/errors");
1113

14+
1215
describe("Report correct error source and path for", () => {
1316
it("schema with broken reference", async () => {
1417
const parser = new $RefParser();
@@ -28,6 +31,12 @@ describe("Report correct error source and path for", () => {
2831
}
2932
});
3033

34+
if (host.node && host.os.windows && path.cwd().includes(" ")) {
35+
// The tests below don't support Windows file paths that contain spaces.
36+
// TODO: Fix the tests below, rather than skipping them
37+
return;
38+
}
39+
3140
it("schema with a local reference pointing at property with broken external reference", async () => {
3241
const parser = new $RefParser();
3342
try {

0 commit comments

Comments
 (0)