Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit a11be6a

Browse files
committed
Fix Cypress test: Change prerendered paths in fixture file
Prerender IDs 3, 4, and 75 (rather than 1 and 2) to match the routes being tested against in the spec file.
1 parent ef45cc5 commit a11be6a

File tree

1 file changed

+6
-2
lines changed
  • cypress/fixtures/pages/getStaticProps/withRevalidate

1 file changed

+6
-2
lines changed

cypress/fixtures/pages/getStaticProps/withRevalidate/[id].js

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ const Show = ({ show }) => (
1919

2020
export async function getStaticPaths() {
2121
// Set the paths we want to pre-render
22-
const paths = [{ params: { id: "1" } }, { params: { id: "2" } }];
22+
const paths = [
23+
{ params: { id: "3" } },
24+
{ params: { id: "4" } },
25+
{ params: { id: "75" } },
26+
];
2327

2428
// We'll pre-render only these paths at build time.
2529
// { fallback: false } means other routes should 404.
@@ -37,7 +41,7 @@ export async function getStaticProps({ params }) {
3741
props: {
3842
show: data,
3943
},
40-
revalidate: 1
44+
revalidate: 1,
4145
};
4246
}
4347

0 commit comments

Comments
 (0)