12ed7123ab
* fix: support markdown preview comments * fix: address markdown preview review feedback * fix: address markdown preview comment scope * fix: address markdown preview follow-up feedback * fix: preserve markdown preview run action in file tabs * fix: ignore svg clicks in markdown preview controls * fix: ignore svg markdown preview selection targets
16 lines
552 B
TypeScript
16 lines
552 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isIgnoredTarget } from "./use-markdown-preview-comments";
|
|
|
|
describe("isIgnoredTarget", () => {
|
|
it("treats SVG descendants inside interactive elements as ignored", () => {
|
|
const button = document.createElement("button");
|
|
button.innerHTML = "<svg><path /></svg>";
|
|
|
|
expect(isIgnoredTarget(button.querySelector("path"))).toBe(true);
|
|
});
|
|
|
|
it("does not ignore plain non-interactive elements", () => {
|
|
expect(isIgnoredTarget(document.createElement("span"))).toBe(false);
|
|
});
|
|
});
|