Skip to content

Commit 00f024a

Browse files
committed
fix a couple tests; try to get more info about remaining failing tests
1 parent c888ec6 commit 00f024a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

test/specs/invalid/invalid.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ describe("Invalid syntax", () => {
164164
message.includes("invalid.json: JSON.parse: end of data while reading object contents") || // Firefox
165165
message.includes("invalid.json: JSON Parse error: Expected '}'") || // Safari
166166
message.includes("invalid.json: JSON.parse Error: Invalid character") || // Edge
167-
message.includes("invalid.json: Syntax error") // IE
167+
message.includes("invalid.json: Syntax error") || // IE
168+
message.includes("Expected property name or \'}\' in JSON at position 2")
168169
),
169170
path: [],
170171
source: message => message.endsWith("test/specs/invalid/invalid.json"),
@@ -318,7 +319,8 @@ describe("Invalid syntax", () => {
318319
message.includes("invalid.json: JSON.parse: end of data while reading object contents") || // Firefox
319320
message.includes("invalid.json: JSON Parse error: Expected '}'") || // Safari
320321
message.includes("invalid.json: JSON.parse Error: Invalid character") || // Edge
321-
message.includes("invalid.json: Syntax error") // IE
322+
message.includes("invalid.json: Syntax error") || // IE
323+
message.includes("Expected property name or \'}\' in JSON at position 2") // Chrome
322324
),
323325
path: ["foo"],
324326
source: message => message.endsWith("/test/") || message.startsWith("http://localhost"),

test/specs/usage/usage.spec.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ describe("Usage", () => {
6767
}
6868
});
6969

70-
expect(parser.$refs.propertyMap).to.deep.equal({
71-
"#/properties/bar": path.abs("/") + "#/properties/foo",
72-
"#/properties/baz": path.abs("/") + "#/properties/foo/properties/id"
73-
});
70+
expect(parser.$refs.propertyMap["#/properties/bar"]).to.equal(path.abs("/") + "#/properties/foo");
71+
expect(parser.$refs.propertyMap["#/properties/baz"]).to.equal(path.abs("/") + "#/properties/foo/properties/id");
72+
// const expected = {
73+
// "#/properties/bar": path.abs("/") + "#/properties/foo",
74+
// "#/properties/baz": path.abs("/") + "#/properties/foo/properties/id"
75+
// };
76+
// expect(parser.$refs.propertyMap).to.deep.equal(expected);
7477
});
7578
});

0 commit comments

Comments
 (0)