From eb065dd63598b0f4d6374f967983575a6c5e25c6 Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Tue, 21 Jan 2025 14:47:46 +0100 Subject: [PATCH] fix: test --- .../server-islands/ssr/src/pages/empty-props.astro | 12 ++++++++++++ packages/astro/test/server-islands.test.js | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 packages/astro/test/fixtures/server-islands/ssr/src/pages/empty-props.astro diff --git a/packages/astro/test/fixtures/server-islands/ssr/src/pages/empty-props.astro b/packages/astro/test/fixtures/server-islands/ssr/src/pages/empty-props.astro new file mode 100644 index 000000000000..d42973294e6d --- /dev/null +++ b/packages/astro/test/fixtures/server-islands/ssr/src/pages/empty-props.astro @@ -0,0 +1,12 @@ +--- +import Island from '../components/Island.astro'; +--- + + + Testing + + +

Testing

+ + + diff --git a/packages/astro/test/server-islands.test.js b/packages/astro/test/server-islands.test.js index 77308d000db8..65a526e8bcf6 100644 --- a/packages/astro/test/server-islands.test.js +++ b/packages/astro/test/server-islands.test.js @@ -69,7 +69,7 @@ describe('Server islands', () => { assert.equal(works, 'true', 'able to set header from server island'); }); it('omits empty props from the query string', async () => { - const res = await fixture.fetch('/'); + const res = await fixture.fetch('/empty-props'); assert.equal(res.status, 200); const html = await res.text(); const fetchMatch = html.match(/fetch\('\/_server-islands\/Island\?[^']*p=([^&']*)/); @@ -142,7 +142,7 @@ describe('Server islands', () => { }); it('omits empty props from the query string', async () => { const app = await fixture.loadTestAdapterApp(); - const request = new Request('http://example.com/'); + const request = new Request('http://example.com/empty-props'); const response = await app.render(request); assert.equal(response.status, 200); const html = await response.text();