import test from "node:test";
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";

test("keeps a restored scroll offset pending until conversation content arrives", async () => {
  const source = await readFile(new URL("./ConversationPanel.jsx", import.meta.url), "utf8");

  assert.match(source, /pendingScrollRef/);
  assert.match(source, /conversation\.length > 0/);
});
