Skip to content

Commit 9631ec8

Browse files
Run eslint --fix
1 parent d34ccfd commit 9631ec8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/govuk/all.test.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ describe('GOV.UK Frontend', () => {
4747
it('exported Components have an init function', async () => {
4848
await goTo(page, '/')
4949

50-
var componentsWithoutInitFunctions = await page.evaluate(() => {
50+
const componentsWithoutInitFunctions = await page.evaluate(() => {
5151
const components = Object.keys(window.GOVUKFrontend)
5252
.filter(method => !['initAll'].includes(method))
5353

5454
return components.filter(component => {
55-
var prototype = window.GOVUKFrontend[component].prototype
55+
const prototype = window.GOVUKFrontend[component].prototype
5656
return typeof prototype.init !== 'function'
5757
})
5858
})

src/govuk/components/accordion/accordion.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ describe('/components/accordion', () => {
1717

1818
const numberOfExampleSections = 2
1919

20-
for (var i = 0; i < numberOfExampleSections; i++) {
21-
var isContentVisible = await page.waitForSelector('.govuk-accordion .govuk-accordion__section:nth-of-type(' + (i + 1) + ') .govuk-accordion__section-content',
20+
for (let i = 0; i < numberOfExampleSections; i++) {
21+
const isContentVisible = await page.waitForSelector('.govuk-accordion .govuk-accordion__section:nth-of-type(' + (i + 1) + ') .govuk-accordion__section-content',
2222
{ visible: true, timeout: 1000 }
2323
)
2424
expect(isContentVisible).toBeTruthy()
@@ -44,7 +44,7 @@ describe('/components/accordion', () => {
4444

4545
const numberOfExampleSections = 2
4646

47-
for (var i = 0; i < numberOfExampleSections; i++) {
47+
for (let i = 0; i < numberOfExampleSections; i++) {
4848
const sectionHeaderButtonExpanded = await page.evaluate(function (i) {
4949
return document.body.querySelector('.govuk-accordion .govuk-accordion__section:nth-of-type(' + (2 + i) + ') .govuk-accordion__section-button').getAttribute('aria-expanded')
5050
}, i)
@@ -86,7 +86,7 @@ describe('/components/accordion', () => {
8686

8787
const numberOfExampleSections = 2
8888

89-
for (var i = 0; i < numberOfExampleSections; i++) {
89+
for (let i = 0; i < numberOfExampleSections; i++) {
9090
const sectionHeaderButtonExpanded = await page.evaluate(function (i) {
9191
return document.body.querySelector('.govuk-accordion .govuk-accordion__section:nth-of-type(' + (2 + i) + ') .govuk-accordion__section-button').getAttribute('aria-expanded')
9292
}, i)

0 commit comments

Comments
 (0)