diff --git a/test/fixtures/format/format.schema.json b/test/fixtures/format/format.schema.json index 941fc656..7887db99 100644 --- a/test/fixtures/format/format.schema.json +++ b/test/fixtures/format/format.schema.json @@ -21,5 +21,10 @@ "format": "Coolness", "value": "Maximum" } - ] + ], + "default": + { + "format": "Coolness", + "value": "Maximum" + } } \ No newline at end of file diff --git a/test/markdownBuilder.test.js b/test/markdownBuilder.test.js index 4fff2381..b6436ad5 100644 --- a/test/markdownBuilder.test.js +++ b/test/markdownBuilder.test.js @@ -167,6 +167,29 @@ value: Maximum }); }); +describe('Testing Markdown Builder: YAML default', () => { + let results; + + before(async () => { + const schemas = await traverseSchemas('format'); + const builder = build({ header: false, exampleFormat: 'yaml' }); + results = builder(schemas); + }); + + it('Format Schema has YAML default', () => { + assertMarkdown(results.format) + .fuzzy`## Properties Default Value + +The default value is: + +\`\`\`yaml +format: Coolness +value: Maximum + +\`\`\``; + }); +}); + describe('Testing Markdown Builder: enums', () => { let results;