Skip to content

Commit

Permalink
Update app-static e2e test (#46900)
Browse files Browse the repository at this point in the history
This ensures we properly check for the none cached content correctly

x-ref:
https://github.com/vercel/next.js/actions/runs/4351711739/jobs/7603961011
  • Loading branch information
ijjk authored Mar 7, 2023
1 parent 030fd1d commit 9c36a32
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/e2e/app-dir/app-static/app-static.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ createNextDescribe(
const html = await res.text()
const $ = cheerio.load(html)

const pageData = $('#page-data').text()
const pageData2 = $('#page-data2').text()

for (let i = 0; i < 3; i++) {
const res2 = await fetchViaHTTP(
Expand All @@ -493,7 +493,7 @@ createNextDescribe(
const html2 = await res2.text()
const $2 = cheerio.load(html2)

expect($2('#page-data').text()).not.toBe(pageData)
expect($2('#page-data2').text()).not.toBe(pageData2)
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ export default async function Page() {
const data = await fetch(
new Request('https://next-data-api-endpoint.vercel.app/api/random', {
method: 'POST',
next: {
revalidate: 0,
},
})
).then((res) => res.text())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ export default async function Page() {
const data = await fetch(
new Request('https://next-data-api-endpoint.vercel.app/api/random', {
method: 'POST',
next: {
revalidate: 0,
},
})
).then((res) => res.text())

Expand Down

0 comments on commit 9c36a32

Please sign in to comment.