Switch to double quotes and reformat codebase with Biome

This commit is contained in:
Mohamed Boudra
2026-03-21 20:22:15 +07:00
parent ab40786882
commit f6579dbeb4
805 changed files with 38132 additions and 40175 deletions
+22 -22
View File
@@ -1,40 +1,40 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from "vitest";
import { isInteractiveDesktopDragTarget } from './desktop-window'
import { isInteractiveDesktopDragTarget } from "./desktop-window";
function createTarget(input: { matchesSelector: (selector: string) => boolean }): EventTarget {
return {
closest: (selector: string) => (input.matchesSelector(selector) ? ({} as Element) : null),
} as unknown as EventTarget
} as unknown as EventTarget;
}
describe('isInteractiveDesktopDragTarget', () => {
it('treats focusable pressables as interactive drag exemptions', () => {
describe("isInteractiveDesktopDragTarget", () => {
it("treats focusable pressables as interactive drag exemptions", () => {
const target = createTarget({
matchesSelector: (selector) => selector.includes('[tabindex]'),
})
matchesSelector: (selector) => selector.includes("[tabindex]"),
});
expect(isInteractiveDesktopDragTarget(target)).toBe(true)
})
expect(isInteractiveDesktopDragTarget(target)).toBe(true);
});
it('treats semantic button targets as interactive drag exemptions', () => {
it("treats semantic button targets as interactive drag exemptions", () => {
const target = createTarget({
matchesSelector: (selector) => selector.includes("[role='button']"),
})
});
expect(isInteractiveDesktopDragTarget(target)).toBe(true)
})
expect(isInteractiveDesktopDragTarget(target)).toBe(true);
});
it('returns false for non-interactive targets', () => {
it("returns false for non-interactive targets", () => {
const target = createTarget({
matchesSelector: () => false,
})
});
expect(isInteractiveDesktopDragTarget(target)).toBe(false)
})
expect(isInteractiveDesktopDragTarget(target)).toBe(false);
});
it('returns false when the target does not support closest()', () => {
expect(isInteractiveDesktopDragTarget(null)).toBe(false)
expect(isInteractiveDesktopDragTarget({} as EventTarget)).toBe(false)
})
})
it("returns false when the target does not support closest()", () => {
expect(isInteractiveDesktopDragTarget(null)).toBe(false);
expect(isInteractiveDesktopDragTarget({} as EventTarget)).toBe(false);
});
});