diff --git a/packages/astro/test/fixtures/ssr-redirect/src/pages/late.astro b/packages/astro/test/fixtures/ssr-redirect/src/pages/late.astro
index dcfedb8da6..62d3541192 100644
--- a/packages/astro/test/fixtures/ssr-redirect/src/pages/late.astro
+++ b/packages/astro/test/fixtures/ssr-redirect/src/pages/late.astro
@@ -1,5 +1,6 @@
---
import Redirect from '../components/redirect.astro';
+const staticMode = import.meta.env.STATIC_MODE;
---
@@ -7,6 +8,8 @@ import Redirect from '../components/redirect.astro';
Testing
-
+ { !staticMode ? (
+
+ ) : }
diff --git a/packages/astro/test/redirects.test.js b/packages/astro/test/redirects.test.js
index 80c783fe2e..f3e6c1121b 100644
--- a/packages/astro/test/redirects.test.js
+++ b/packages/astro/test/redirects.test.js
@@ -29,7 +29,7 @@ describe('Astro.redirect', () => {
const request = new Request('http://example.com/late');
const response = await app.render(request);
try {
- const text = await response.text();
+ await response.text();
expect(false).to.equal(true);
} catch (e) {
expect(e.message).to.equal(
@@ -41,6 +41,7 @@ describe('Astro.redirect', () => {
describe('output: "static"', () => {
before(async () => {
+ process.env.STATIC_MODE = true;
fixture = await loadFixture({
root: './fixtures/ssr-redirect/',
output: 'static',