Fix failing tests

pull/1331/head
Kamran Ahmed 5 years ago
parent c94341f61c
commit c07705a907
  1. 3
      test/path-map.spec.js

@ -20,6 +20,7 @@ describe("Build scripts tests", () => {
'/terms': { page: '/terms' }, '/terms': { page: '/terms' },
'/guides': { page: '/guides/index' }, '/guides': { page: '/guides/index' },
'/roadmaps': { page: '/roadmaps' }, '/roadmaps': { page: '/roadmaps' },
'/signup': { page: '/signup' },
}); });
}); });
@ -59,7 +60,7 @@ describe("Build scripts tests", () => {
test('it should generate valid roadmap routes', () => { test('it should generate valid roadmap routes', () => {
const expectedPathMap = roadmaps.reduce((roadmapAcc, roadmap) => { const expectedPathMap = roadmaps.reduce((roadmapAcc, roadmap) => {
// Routes for each of the versions of this roadmap // Routes for each of the versions of this roadmap
const versionRoutes = roadmap.versions.reduce((versionAcc, version) => ({ const versionRoutes = (roadmap.versions || []).reduce((versionAcc, version) => ({
...versionAcc, ...versionAcc,
[`${roadmap.url}/${version}`]: { [`${roadmap.url}/${version}`]: {
page: '/[roadmap]/[version]', page: '/[roadmap]/[version]',

Loading…
Cancel
Save