Skip to content

Commit

Permalink
test(markdown): create test for crash due to format property
Browse files Browse the repository at this point in the history
example provided by @AndyOGo in
#198 (comment)

see #198
  • Loading branch information
trieloff committed Jan 14, 2020
1 parent ace3299 commit 85ca0e9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/fixtures/format/format.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "object",
"title": "Properties",
"description": "Properties of Datepicker.",

"additionalProperties": false,
"properties": {
"format": {
"type": "string",
"title": "Format",
"description": "Formatting used to display the date."
},
"value": {
"type": "string",
"title": "Value",
"description": "Date to be displayed."
}
}
}
15 changes: 15 additions & 0 deletions test/markdownBuilder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ describe('Testing Markdown Builder: title', () => {
});
});

describe('Testing Markdown Builder: format', () => {
let results;

before(async () => {
const schemas = await loadschemas('format');
const builder = build({ header: false });
results = builder(schemas);
});

it('Format Schema looks OK', () => {
assertMarkdown(results.properties)
.fuzzy`defined in: [Meta](meta-definitions-meta-properties-title.md "https://ns.adobe.com/helix/pipeline/meta#/definitions/meta/properties/title")`;
});
});

describe('Testing Markdown Builder: enums', () => {
let results;

Expand Down

0 comments on commit 85ca0e9

Please sign in to comment.