- commit
- a00a0107bda3c1a018a3a2c33f95b13b3810072e
- parent
- 3df8e9d6ab533295a3eadc19007ab4fbd9034154
- author
- Dami <dami.etoile@gmail.com>
| M | diagramzip/ | 2 | +- |
| M | diagramzip/ | 5 | +++-- |
@@ -6,7 +6,7 @@ export function exampleVariant(index, context) {
66 const gray = grayCode(index)77 return {88 meta: {9- title: gray & 1 ? context.title : '',9+ title: context.title,1010 description: gray & 2 ? context.description : '',1111 },1212 presentation: {@@ -9,11 +9,12 @@ test('changes one example axis at a time across the catalog', () => {
99 }1010 })1111 12-test('varies metadata and padding without applying an example canvas or frame', () => {12+test('names every example while varying descriptions and padding', () => {1313 const context = { title: 'Title', description: 'Description' }1414 const variants = Array.from({ length: 30 }, (_, index) => exampleVariant(index, context))15- assert.ok(variants.some(variant => variant.meta.title))15+ assert.ok(variants.every(variant => variant.meta.title === context.title))1616 assert.ok(variants.some(variant => variant.meta.description))17+ assert.ok(variants.some(variant => !variant.meta.description))1718 assert.ok(variants.some(variant => variant.presentation.padding))1819 assert.ok(variants.every(variant => variant.presentation.background === ''))1920 assert.ok(variants.every(variant => variant.presentation.frame === false))