summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/test
diff options
context:
space:
mode:
authorGravatar Martin Clementz <martincclementz@gmail.com> 2023-09-13 18:30:23 +0200
committerGravatar GitHub <noreply@github.com> 2023-09-13 18:30:23 +0200
commit6c6f1aef43bd213a010df1fac47ec39b884d3abc (patch)
treefb7086ebd98557e29beaf8504350b96552135ccf /packages/integrations/netlify/test
parentde8d6ad2376fef8e6d8c02e590c1322dbfa1a7a9 (diff)
downloadastro-6c6f1aef43bd213a010df1fac47ec39b884d3abc.tar.gz
astro-6c6f1aef43bd213a010df1fac47ec39b884d3abc.tar.zst
astro-6c6f1aef43bd213a010df1fac47ec39b884d3abc.zip
chore: check if ssr works on netlify (#8002)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/netlify/test')
-rw-r--r--packages/integrations/netlify/test/hosted/hosted-astro-project/src/pages/time.astro5
-rw-r--r--packages/integrations/netlify/test/hosted/hosted.test.js8
2 files changed, 13 insertions, 0 deletions
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);
+ });
});