Skip to content

Commit

Permalink
test(markdownbuilder.js/makedefault): add a test for new default yaml…
Browse files Browse the repository at this point in the history
… example-format
  • Loading branch information
anisite committed Mar 24, 2023
1 parent 93a389c commit 556e310
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/fixtures/format/format.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@
"format": "Coolness",
"value": "Maximum"
}
]
],
"default":
{
"format": "Coolness",
"value": "Maximum"
}
}
23 changes: 23 additions & 0 deletions test/markdownBuilder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 556e310

Please sign in to comment.