import { test } from "node:test"; import assert from "node:assert/strict"; import { hangsFromEnd } from "../../shared/src/dropdown/edge.ts"; test("a list that ends inside the window stays hung from the left", () => { assert.equal(hangsFromEnd(300, 1000), false); assert.equal(hangsFromEnd(1000, 1000), false); }); test("a list that ends past the window edge hangs from the right", () => { assert.equal(hangsFromEnd(1001, 1000), true); });