Skip to content

Commit 1bfc693

Browse files
committed
chore: add tests for .gz static files
1 parent 9280a23 commit 1bfc693

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
49 Bytes
Binary file not shown.

test/tests.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ export function testNitro(
447447
expect(headers["content-type"]).toBe("text/plain; charset=utf-8");
448448
});
449449

450+
it("serve static asset /build/test.js.gz", async () => {
451+
const { status, headers } = await callHandler({
452+
url: "/build/test.js.gz",
453+
});
454+
expect(status).toBe(200);
455+
expect(headers["content-encoding"]).toBe("gzip");
456+
});
457+
450458
it("stores content-type for prerendered routes", async () => {
451459
const { data, headers } = await callHandler({
452460
url: "/api/param/prerender4",

0 commit comments

Comments
 (0)