Skip to content

Commit 69b8887

Browse files
Merge pull request #2253 from alphagov/2252-add-comments-to-the-starter-filtersjs-file
Add comments to the prototype-starter filters file
2 parents 3769c0e + 9cf607c commit 69b8887

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- [#2253: Add comments to the prototype-starter filters file](https://github.com/alphagov/govuk-prototype-kit/pull/2253)
8+
59
## 13.10.0
610

711
### New features

__tests__/spec/migrate.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,17 @@ describe('migrate test prototype', () => {
9999
it('filters.js should be overwritten', () => {
100100
const filtersFileContents = getNormalisedFileContent(path.join(appDirectory, 'filters.js'))
101101

102-
expect(filtersFileContents).toEqual(
103-
'const govukPrototypeKit = require(\'govuk-prototype-kit\')\n' +
104-
'const addFilter = govukPrototypeKit.views.addFilter' + '\n'
102+
expect(filtersFileContents).toEqual(`//
103+
// For guidance on how to create filters see:
104+
// https://prototype-kit.service.gov.uk/docs/filters
105+
//
106+
107+
const govukPrototypeKit = require('govuk-prototype-kit')
108+
const addFilter = govukPrototypeKit.views.addFilter
109+
110+
// Add your filters here
111+
112+
`
105113
)
106114
})
107115

prototype-starter/app/filters.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
//
2+
// For guidance on how to create filters see:
3+
// https://prototype-kit.service.gov.uk/docs/filters
4+
//
5+
16
const govukPrototypeKit = require('govuk-prototype-kit')
27
const addFilter = govukPrototypeKit.views.addFilter
8+
9+
// Add your filters here
10+

0 commit comments

Comments
 (0)