From 6c6f1aef43bd213a010df1fac47ec39b884d3abc Mon Sep 17 00:00:00 2001 From: Martin Clementz Date: Wed, 13 Sep 2023 18:30:23 +0200 Subject: [PATCH] chore: check if ssr works on netlify (#8002) Co-authored-by: Nate Moore --- .../test/hosted/hosted-astro-project/src/pages/time.astro | 5 +++++ packages/integrations/netlify/test/hosted/hosted.test.js | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 packages/integrations/netlify/test/hosted/hosted-astro-project/src/pages/time.astro diff --git a/packages/integrations/netlify/test/hosted/hosted-astro-project/src/pages/time.astro b/packages/integrations/netlify/test/hosted/hosted-astro-project/src/pages/time.astro new file mode 100644 index 000000000..873b5c720 --- /dev/null +++ b/packages/integrations/netlify/test/hosted/hosted-astro-project/src/pages/time.astro @@ -0,0 +1,5 @@ +--- +const currentTime = new Date().getTime(); +--- + +{currentTime} diff --git a/packages/integrations/netlify/test/hosted/hosted.test.js b/packages/integrations/netlify/test/hosted/hosted.test.js index 0ce531e4d..2dc8c67ce 100644 --- a/packages/integrations/netlify/test/hosted/hosted.test.js +++ b/packages/integrations/netlify/test/hosted/hosted.test.js @@ -10,4 +10,12 @@ describe('Hosted Netlify Tests', () => { expect(image.status).to.equal(200); }); + + it('Server returns fresh content', async () => { + const responseOne = await fetch(NETLIFY_TEST_URL + '/time'); + + const responseTwo = await fetch(NETLIFY_TEST_URL + '/time'); + + expect(responseOne.body).to.not.equal(responseTwo.body); + }); });