mirror of
https://github.com/coder/coder.git
synced 2026-06-04 05:28:20 +00:00
a581431bc8
- Fix to display apps with disabled health status on workspaces list - Migrate WorkspacesPage jest test into vitest - Modularize vitest setup into separate files: - setup/polyfills.ts: Blob, ResizeObserver polyfills - setup/domStubs.ts: Radix UI pointer capture stubs - setup/mocks.ts: useProxyLatency mock - setup/msw.ts: MSW server lifecycle Fixed #20319
13 lines
567 B
TypeScript
13 lines
567 B
TypeScript
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;
|
|
|
|
globalThis.ResizeObserver = require("resize-observer-polyfill");
|