chore: migrate tar tests to vitest (#21406)

This commit is contained in:
ケイラ
2026-01-05 13:18:04 -07:00
committed by GitHub
parent 172cd13b24
commit 5691d38db7
3 changed files with 11 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Blob as NativeBlob } from "node:buffer";
// JSDom `Blob` is missing important methods[1] that have been standardized for
// years. MDN categorizes this API as baseline[2].
// [1]: https://github.com/jsdom/jsdom/issues/2555
// [2]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer
// @ts-expect-error - Minor type incompatibilities due to TypeScript's
// introduction of the `ArrayBufferLife` type and the related generic parameters
// changes.
globalThis.Blob = NativeBlob;
+1 -1
View File
@@ -137,7 +137,7 @@ export default defineConfig({
include: ["src/**/*.test.?(m)ts?(x)"],
globals: true,
environment: "jsdom",
setupFiles: ["@testing-library/jest-dom/vitest"],
setupFiles: ["@testing-library/jest-dom/vitest", "./test/vitestSetup.ts"],
silent: "passed-only",
},
});