Skip to content

Commit

Permalink
Merge pull request eclipse-thingweb#1 from mmccool/dec-2018-testfest
Browse files Browse the repository at this point in the history
Dec 2018 testfest
  • Loading branch information
egekorkan authored Dec 10, 2018
2 parents cef0638 + 8758670 commit 6584c1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Empty file added AssertionTester/Results/.keep
Empty file.
16 changes: 8 additions & 8 deletions AssertionTester/assertionTester.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var storedTdAddress;

const draftLocation = "./AssertionTester/json-schema-draft-06.json";

const fields = ['assertion-id', 'result'];
const fields = ['ID', 'Status'];
const json2csvParser = new Json2csvParser({
fields
});
Expand Down Expand Up @@ -82,8 +82,8 @@ fs.readFile(storedTdAddress, (err, tdData) => {
if (valid) {
console.log('Assertion '+ schema.title +' passed');
results.push({
"assertion-id": schema.title,
"result": "pass"
"ID": schema.title,
"Status": "pass"
});

} else {
Expand All @@ -93,16 +93,16 @@ fs.readFile(storedTdAddress, (err, tdData) => {
//failed because it doesnt have required key which is a non implemented feature
console.log('Assertion ' + schema.title + ' not implemented');
results.push({
"assertion-id": schema.title,
"result": "not-impl",
"ID": schema.title,
"Status": "not-impl",
"additionalInfo": ajv.errorsText()
});
} else {
//failed because of some other reason
console.log('Assertion ' + schema.title + ' failed');
results.push({
"assertion-id": schema.title,
"result": "fail",
"ID": schema.title,
"Status": "fail",
"additionalInfo": ajv.errorsText()
});
}
Expand Down Expand Up @@ -133,4 +133,4 @@ fs.readFile(storedTdAddress, (err, tdData) => {
});
});
});
});
});

0 comments on commit 6584c1b

Please sign in to comment.