diff options
author | 2023-07-24 15:49:29 +0800 | |
---|---|---|
committer | 2023-07-24 15:49:29 +0800 | |
commit | baaf80b27d812ba147a77ca27452ca96714a777e (patch) | |
tree | 01d815f15e2fa3542ca3ba0309bbb846e72418b7 | |
parent | da7f1128bf749dab1d9bd43e50c29a67e8271746 (diff) | |
download | astro-baaf80b27d812ba147a77ca27452ca96714a777e.tar.gz astro-baaf80b27d812ba147a77ca27452ca96714a777e.tar.zst astro-baaf80b27d812ba147a77ca27452ca96714a777e.zip |
Fix prerender getStaticPaths flaky test (#7745)
-rw-r--r-- | packages/astro/test/ssr-prerender-get-static-paths.test.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/astro/test/ssr-prerender-get-static-paths.test.js b/packages/astro/test/ssr-prerender-get-static-paths.test.js index 08e3060f0..391e7485d 100644 --- a/packages/astro/test/ssr-prerender-get-static-paths.test.js +++ b/packages/astro/test/ssr-prerender-get-static-paths.test.js @@ -59,7 +59,11 @@ describe('Prerender', () => { await devServer.stop(); }); - it('only calls prerender getStaticPaths once', async () => { + it('only calls prerender getStaticPaths once', async function () { + // Sometimes this fail in CI as the chokidar watcher triggers an update and invalidates the route cache, + // causing getStaticPaths to be called twice. Workaround this with 2 retries for now. + this.retries(2); + let res = await fixture.fetch('/blog/a'); expect(res.status).to.equal(200); |