UNPKG

vitest-webgl-canvas-mock

Version:
21 lines (16 loc) 330 B
import { vi } from "vitest"; export default class ImageBitmap { width = 0; height = 0; _closed = false; constructor(width, height) { this.width = width; this.height = height; this.close = vi.fn(this.close.bind(this)); } close() { this.width = 0; this.height = 0; this._closed = true; } }