Skip to content

Commit

Permalink
fix prerender test
Browse files Browse the repository at this point in the history
  • Loading branch information
gaojude committed Nov 4, 2024
1 parent f2b44af commit 308cfcd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions test/e2e/prerender.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1133,13 +1133,8 @@ describe('Prerender', () => {

await next.patchFile(
'pages/index.js',
(content) =>
content
.replace('// throw new', 'throw new')
.replace('{/* <div', '<div')
.replace('</div> */}', '</div>'),
(content) => content.replace('// throw new', 'throw new'),
async () => {
await browser.waitForElementByCss('#after-change')
// we need to reload the page to trigger getStaticProps
await browser.refresh()

Expand Down
1 change: 0 additions & 1 deletion test/e2e/prerender/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export async function getStaticProps() {
const Page = ({ world, time }) => {
return (
<>
{/* <div id='after-change'>idk</div> */}
<p>hello {world}</p>
<span>time: {time}</span>
<Link href="/non-json/[p]" as="/non-json/1" id="non-json">
Expand Down

0 comments on commit 308cfcd

Please sign in to comment.