diff options
Diffstat (limited to 'packages/integrations/netlify/test/hosted/hosted.test.js')
-rw-r--r-- | packages/integrations/netlify/test/hosted/hosted.test.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/integrations/netlify/test/hosted/hosted.test.js b/packages/integrations/netlify/test/hosted/hosted.test.js index 237ba5998..2c40e3a69 100644 --- a/packages/integrations/netlify/test/hosted/hosted.test.js +++ b/packages/integrations/netlify/test/hosted/hosted.test.js @@ -12,10 +12,17 @@ describe('Hosted Netlify Tests', () => { assert.equal(image.status, 200); }); + it('passes context from edge middleware', async () => { + const response = await fetch(`${NETLIFY_TEST_URL}/country`); + const body = await response.text(); + assert.match(body, /has context/); + assert.match(body, /Deno/); + }); + it('Server returns fresh content', async () => { - const responseOne = await fetch(`${NETLIFY_TEST_URL}/time`); + const responseOne = await fetch(`${NETLIFY_TEST_URL}/time`).then((res) => res.text()); - const responseTwo = await fetch(`${NETLIFY_TEST_URL}/time`); + const responseTwo = await fetch(`${NETLIFY_TEST_URL}/time`).then((res) => res.text()); assert.notEqual(responseOne.body, responseTwo.body); }); |