Skip to content

Commit

Permalink
fix: update tests to address Prettier issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sghoweri committed Mar 14, 2019
1 parent c15f01b commit 1a5a579
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 55 deletions.
117 changes: 63 additions & 54 deletions packages/components/lists/bolt-chip-list/__tests__/chip-list.js
Expand Up @@ -18,70 +18,79 @@ describe('<bolt-chip-list> Component', async () => {
});

test('basic usage without links', async () => {
const results = await renderTwig('@bolt-components-chip-list/chip-list.twig', {
items: [
{
text: 'Chip text 1',
},
{
text: 'Chip text 2',
},
{
text: 'Chip text 3',
},
{
text: 'Chip text 4',
},
],
});
const results = await renderTwig(
'@bolt-components-chip-list/chip-list.twig',
{
items: [
{
text: 'Chip text 1',
},
{
text: 'Chip text 2',
},
{
text: 'Chip text 3',
},
{
text: 'Chip text 4',
},
],
},
);
expect(results.ok).toBe(true);
expect(results.html).toMatchSnapshot();
});

test('basic usage with links', async () => {
const results = await renderTwig('@bolt-components-chip-list/chip-list.twig', {
items: [
{
text: 'Chip link 1',
url: '#!',
},
{
text: 'Chip link 2',
url: '#!',
},
{
text: 'Chip link 3',
url: '#!',
},
{
text: 'Chip link 4',
url: '#!',
},
],
});
const results = await renderTwig(
'@bolt-components-chip-list/chip-list.twig',
{
items: [
{
text: 'Chip link 1',
url: '#!',
},
{
text: 'Chip link 2',
url: '#!',
},
{
text: 'Chip link 3',
url: '#!',
},
{
text: 'Chip link 4',
url: '#!',
},
],
},
);
expect(results.ok).toBe(true);
expect(results.html).toMatchSnapshot();
});

test('basic usage with mixed behavior', async () => {
const results = await renderTwig('@bolt-components-chip-list/chip-list.twig', {
items: [
{
text: 'Chip link 1',
url: '#!',
},
{
text: 'Chip text 1',
},
{
text: 'Chip link 3',
url: '#!',
},
{
text: 'Chip text 2',
},
],
});
const results = await renderTwig(
'@bolt-components-chip-list/chip-list.twig',
{
items: [
{
text: 'Chip link 1',
url: '#!',
},
{
text: 'Chip text 1',
},
{
text: 'Chip link 3',
url: '#!',
},
{
text: 'Chip text 2',
},
],
},
);
expect(results.ok).toBe(true);
expect(results.html).toMatchSnapshot();
});
Expand Down
1 change: 0 additions & 1 deletion packages/components/lists/bolt-ul/__tests__/ul.js
Expand Up @@ -12,7 +12,6 @@ async function renderTwigString(template, data) {
return await renderString(template, data, true);
}


describe('<bolt-ul> Component', async () => {
afterAll(async () => {
await stopTwigRenderer();
Expand Down

0 comments on commit 1a5a579

Please sign in to comment.