Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed May 5, 2020
1 parent b4104d1 commit 7922f62
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/lib/validation/schema/__helper__/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module.exports = {
test(`kind: extension / type: ${type} basic (${specVersion})`, async (t) => {
await assertValidation(t, Object.assign({
"specVersion": specVersion,
"kind": "extension",
"type": type,
"metadata": {
"name": "my-" + type
Expand All @@ -33,7 +32,6 @@ module.exports = {
test(`kind: extension / type: ${type} additionalProperties (${specVersion})`, async (t) => {
await assertValidation(t, Object.assign({
"specVersion": specVersion,
"kind": "extension",
"type": type,
"metadata": {
"name": "my-" + type
Expand All @@ -50,24 +48,26 @@ module.exports = {
}]);
});

test(`${type} Invalid configuration: Additional property (${specVersion})`, async (t) => {
await assertValidation(t, Object.assign( {
"specVersion": specVersion,
"type": type,
"metadata": {
"name": "my-" + type
},
"notAllowed": true
}, additionalConfiguration), [{
dataPath: "",
keyword: "additionalProperties",
message: "should NOT have additional properties",
params: {
additionalProperty: "notAllowed",
},
schemaPath: specVersion === "2.1" ? "#/then/additionalProperties" : "#/else/additionalProperties"
}]);
});
test(`kind: extension / type: ${type} Invalid configuration: Additional property (${specVersion})`,
async (t) => {
await assertValidation(t, Object.assign( {
"specVersion": specVersion,
"type": type,
"metadata": {
"name": "my-" + type
},
"notAllowed": true
}, additionalConfiguration), [{
dataPath: "",
keyword: "additionalProperties",
message: "should NOT have additional properties",
params: {
additionalProperty: "notAllowed",
},
schemaPath:
specVersion === "2.1" ? "#/then/additionalProperties" : "#/else/additionalProperties"
}]);
});
});
}
};

0 comments on commit 7922f62

Please sign in to comment.