Something went wrong. Try again.
Tea journaling on ATProto (alpha) forked from arabica.social/arabica
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132import "@testing-library/jest-dom/vitest";import { cleanup } from "@solidjs/testing-library";import { afterEach, vi } from "vitest";
// jsdom ships HTMLDialogElement without the modal methods BrewFormPage uses for// its inline create dialog, so mirror the open attribute those calls toggle.if (typeof HTMLDialogElement !== "undefined") { if (!HTMLDialogElement.prototype.showModal) { HTMLDialogElement.prototype.showModal = function showModal( this: HTMLDialogElement, ) { this.setAttribute("open", ""); }; } if (!HTMLDialogElement.prototype.close) { HTMLDialogElement.prototype.close = function close( this: HTMLDialogElement, ) { this.removeAttribute("open"); }; }}
// jsdom has no layout, so its scrollTo only logs "not implemented".window.scrollTo = () => {};
afterEach(() => { cleanup(); vi.unstubAllGlobals(); vi.restoreAllMocks();});