Skip to content

Commit

Permalink
Fixing testing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dgparmar14 committed Jul 22, 2024
1 parent 1f7f36a commit aa64d41
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/github-discussion-schema.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ const filesInDir = fs

filesInDir.forEach((file) => {
const content = fs.readFileSync(join(GH_DATA, file)).toString();
if (content === "null") {
process.exit(1);
}
const data = JSON.parse(stripJsonComments(content));
if (content !== "null") {
const data = JSON.parse(stripJsonComments(content));

describe(`Validate '${file}'`, function () {
it("should be properly validated by the json schema", () => {
expect(data).to.be.jsonSchema(schema);
describe(`Validate '${file}'`, function () {
it("should be properly validated by the json schema", () => {
expect(data).to.be.jsonSchema(schema);
});
});
});
}
});

0 comments on commit aa64d41

Please sign in to comment.