diff --git a/packages/astro/test/fixtures/ts-in-hoisted-script/src/pages/index.astro b/packages/astro/test/fixtures/ts-in-hoisted-script/src/pages/index.astro
new file mode 100644
index 0000000000..16c9426aa7
--- /dev/null
+++ b/packages/astro/test/fixtures/ts-in-hoisted-script/src/pages/index.astro
@@ -0,0 +1,19 @@
+---
+---
+
+
+ Testing
+
+
+ Testing
+
+
+
diff --git a/packages/astro/test/ts-in-hoisted-script.test.js b/packages/astro/test/ts-in-hoisted-script.test.js
new file mode 100644
index 0000000000..ffc459f856
--- /dev/null
+++ b/packages/astro/test/ts-in-hoisted-script.test.js
@@ -0,0 +1,18 @@
+import { expect } from 'chai';
+import * as cheerio from 'cheerio';
+import { loadFixture } from './test-utils.js';
+
+describe('Using TypeScript in hoisted scripts', () => {
+ /** @type {import('./test-utils').Fixture} */
+ let fixture;
+
+ before(async () => {
+ fixture = await loadFixture({ root: './fixtures/ts-in-hoisted-script/' });
+ await fixture.build();
+ });
+
+ it('works', async () => {
+ const html = await fixture.readFile('/index.html');
+ console.log(html);
+ });
+});