Skip to content

Commit a7dda94

Browse files
fix: lint js
1 parent 92adaac commit a7dda94

File tree

1 file changed

+59
-55
lines changed

1 file changed

+59
-55
lines changed

packages/components/bolt-pagination/__tests__/pagination.js

Lines changed: 59 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import {
66
const { readYamlFileSync } = require('@bolt/build-tools/utils/yaml');
77
const { join } = require('path');
88
const schema = readYamlFileSync(join(__dirname, '../pagination.schema.yml'));
9-
const {
10-
align
11-
} = schema.properties;
9+
const { align } = schema.properties;
1210

1311
async function renderTwig(template, data) {
1412
return await render(template, data, true);
@@ -27,74 +25,80 @@ describe('<bolt-pagination> Component', async () => {
2725

2826
// Basic Usage
2927
test('Basic usage', async () => {
30-
const results = await renderTwig('@bolt-components-pagination/pagination.twig', {
31-
current: 5,
32-
total: 10,
33-
first: {
34-
href: '#!'
35-
},
36-
previous: {
37-
href: '#!'
38-
},
39-
pages: {
40-
3: {
41-
href: '#!'
28+
const results = await renderTwig(
29+
'@bolt-components-pagination/pagination.twig',
30+
{
31+
current: 5,
32+
total: 10,
33+
first: {
34+
href: '#!',
35+
},
36+
previous: {
37+
href: '#!',
4238
},
43-
4: {
44-
href: '#!'
39+
pages: {
40+
3: {
41+
href: '#!',
42+
},
43+
4: {
44+
href: '#!',
45+
},
46+
5: {
47+
href: '#!',
48+
},
49+
6: {
50+
href: '#!',
51+
},
52+
7: {
53+
href: '#!',
54+
},
4555
},
46-
5: {
47-
href: '#!'
56+
next: {
57+
href: '#!',
4858
},
49-
6: {
50-
href: '#!'
59+
last: {
60+
href: '#!',
5161
},
52-
7: {
53-
href: '#!'
54-
}
55-
},
56-
next: {
57-
href: '#!'
5862
},
59-
last: {
60-
href: '#!'
61-
}
62-
});
63+
);
6364
expect(results.ok).toBe(true);
6465
expect(results.html).toMatchSnapshot();
6566
});
6667

6768
// Props
6869
align.enum.forEach(async alignChoice => {
6970
test(`Horizontal alignment: ${alignChoice}`, async () => {
70-
const results = await renderTwig('@bolt-components-pagination/pagination.twig', {
71-
align: alignChoice,
72-
current: 1,
73-
total: 5,
74-
pages: {
75-
1: {
76-
href: '#!'
77-
},
78-
2: {
79-
href: '#!'
71+
const results = await renderTwig(
72+
'@bolt-components-pagination/pagination.twig',
73+
{
74+
align: alignChoice,
75+
current: 1,
76+
total: 5,
77+
pages: {
78+
1: {
79+
href: '#!',
80+
},
81+
2: {
82+
href: '#!',
83+
},
84+
3: {
85+
href: '#!',
86+
},
87+
4: {
88+
href: '#!',
89+
},
90+
5: {
91+
href: '#!',
92+
},
8093
},
81-
3: {
82-
href: '#!'
94+
next: {
95+
href: '#!',
8396
},
84-
4: {
85-
href: '#!'
97+
last: {
98+
href: '#!',
8699
},
87-
5: {
88-
href: '#!'
89-
}
90100
},
91-
next: {
92-
href: '#!'
93-
},
94-
last: {
95-
href: '#!'
96-
}
97-
});
101+
);
98102
expect(results.ok).toBe(true);
99103
expect(results.html).toMatchSnapshot();
100104
});

0 commit comments

Comments
 (0)