Skip to content

Commit

Permalink
fix: jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemai2awesome committed Dec 10, 2019
1 parent b651bb8 commit 1cd931d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions packages/components/bolt-list/__tests__/list.js
Expand Up @@ -16,6 +16,7 @@ const {
align,
valign,
tag,
nowrap,
} = schema.properties;

const timeout = 120000;
Expand Down Expand Up @@ -112,6 +113,38 @@ describe('<bolt-list> Component', () => {
});
});

nowrap.enum.forEach(async nowrapChoice => {
test(`list nowrap: ${nowrapChoice}`, async () => {
const results = await render('@bolt-components-list/list.twig', {
display: 'inline',
nowrap: nowrapChoice,
items: [
'item 1',
'item 2',
'item 3',
'item 4',
'item 5',
'item 6',
'item 7',
'item 8',
'item 9',
'item 10',
'item 11',
'item 12',
'item 13',
'item 14',
'item 15',
'item 16',
'item 17',
'item 18',
'item 19',
],
});
expect(results.ok).toBe(true);
expect(results.html).toMatchSnapshot();
});
});

test('Bolt List: items accept renderable objects as content', async () => {
const results = await renderString(`
{% set item_1 = create_attribute({'test-attr': 'test-value'}) %}
Expand Down

0 comments on commit 1cd931d

Please sign in to comment.