Files
Zack TannerandGitHub c03aaee550 tests: disable flaky deployment test while investigating upstream (#83705)
This test has started failing when deployed to hosted environments, but
it consistently is passing in `next start` tests.

We could retry the on-demand revalidation and the test will pass, but we
lose the value in the test.

This instead temporarily disables it until it can be investigated
upstream.

[slack
x-ref](https://vercel.slack.com/archives/C04KC8A53T7/p1757108995256419)
2025-09-11 19:49:30 -07:00

18 lines
473 B
JavaScript

export default async function handler(req, res) {
// WARNING: don't use user input in production
// make sure to use trusted value for revalidating
let revalidated = false
try {
console.log('API: Called res.revalidate for ', req.query.pathname)
await res.revalidate(req.query.pathname, {
unstable_onlyGenerated: !!req.query.onlyGenerated,
})
revalidated = true
} catch (err) {
console.error(err)
}
res.json({
revalidated,
})
}