1
0
mirror of synced 2025-12-25 02:17:36 -05:00

req.context.pages is now an object, we need it to be an array

This commit is contained in:
Sarah Schneider
2020-12-08 16:02:15 -05:00
parent fe29938bf7
commit f27002810f

View File

@@ -1,4 +1,5 @@
const { LinksChecker, buildInitialContext, buildPathContext } = require('../helpers/links-checker')
const { uniq } = require('lodash')
const languageCode = 'en'
// TODO set to true when we're ready to report and fix broken anchors
@@ -14,7 +15,7 @@ describe('page rendering', () => {
// we only want to build these one time
const context = await buildInitialContext()
const englishPages = context.pages
const englishPages = uniq(Object.values(context.pages))
.filter(page => page.languageCode === languageCode)
for (const page of englishPages) {