Skip to content

Instantly share code, notes, and snippets.

View JoCa96's full-sized avatar
⁉️

Jonathan JoCa96

⁉️
  • Germany's Deep South
  • 17:01 (UTC +02:00)
View GitHub Profile
import { beforeEach, describe, expect, test, vi, type Mock } from "vitest";
import { WeakRefMap } from "./WeakRefMap.js";
describe("WeakRefMap", () => {
const mockDeref = vi.fn();
const mockRegister = vi.fn();
const mockUnregister = vi.fn();
const VALUE_1 = { id: 1 };
const VALUE_2 = { id: 2 };
import Color from "https://colorjs.io/dist/color.js";
const customPropsFromCss = (string) => {
return string
.split("\n")
.map((line) => line.split(":")[0].trim())
.filter((line) => line.trim());
};
const getComputedColors = (customProperties, elem) => {