Skip to content

Commit

Permalink
generate mock data for findPage.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Sep 30, 2024
1 parent d1e689c commit 9acb619
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions test/unit/findPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import addFilters from '../../src/filters/filters'
import jsdom from 'jsdom'
import { runGenericPageTests } from './generic-page.js'
import config from '../../config/index.js'
import mock from '../utils/mocker.js'
import { OrgFindPage } from '../../src/routes/schemas.js'

const nunjucksEnv = nunjucks.configure([
'src/views',
Expand All @@ -20,32 +22,7 @@ const nunjucksEnv = nunjucks.configure([
addFilters(nunjucksEnv, {})

describe('Organisations Find Page', () => {
const params = {
alphabetisedOrgs: {
A: [
{
name: 'Aberdeen'
},
{
name: 'Aylesbury'
},
{
name: 'Ashford'
}
],
B: [
{
name: 'Bath'
},
{
name: 'Birmingham'
},
{
name: 'Brighton'
}
]
}
}
const params = mock(OrgFindPage)

const html = nunjucks.render('organisations/find.html', params)

Expand Down

0 comments on commit 9acb619

Please sign in to comment.