From 5bf7eb6e2af20055abca4230dd63961df2f759c0 Mon Sep 17 00:00:00 2001 From: mzanelee Date: Wed, 10 May 2023 07:33:40 -0400 Subject: [PATCH] fix: support application/x-gzip metadata in html report (#3333) Co-authored-by: Michael Lee --- packages/ui/client/composables/client/static.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/client/composables/client/static.ts b/packages/ui/client/composables/client/static.ts index 221bfb0de3c..d044ae0e61b 100644 --- a/packages/ui/client/composables/client/static.ts +++ b/packages/ui/client/composables/client/static.ts @@ -74,7 +74,7 @@ export function createStaticClient(): VitestClient { async function registerMetadata() { const res = await fetch(window.METADATA_PATH!) const contentType = res.headers.get('content-type')?.toLowerCase() || '' - if (contentType.includes('application/gzip')) { + if (contentType.includes('application/gzip') || contentType.includes('application/x-gzip')) { const compressed = new Uint8Array(await res.arrayBuffer()) const decompressed = strFromU8(decompressSync(compressed)) metadata = parse(decompressed) as HTMLReportMetadata