Public: anyone can read this; the crew can change it.

A test pins review threads: resolving and unresolving round-trip, and a comment on a changed line reads as outdated #6907

shipped production is serving it opened this has it
opened this

src/core/reviews.ts keeps a pull's review threads (resolveThread, unresolveThread, threadStates, withOutdated, latestReviewByAuthor, byAnchor). None is named in a test.

Done:

  • [ ] test/review-threads.test.ts: resolving a thread shows it resolved in threadStates, unresolving shows it open, and resolving twice changes nothing.
  • [ ] A comment anchored to a line whose content later changed is marked outdated by withOutdated; one on an unchanged line is not.
  • [ ] latestReviewByAuthor returns each author's newest review only. byAnchor groups comments on the same file and line.

This is a new test file only. Change code only where the test finds a hole, and say so in the pull. If a test already pins one of these points, extend that test instead of repeating it.

Files: test/review-threads.test.ts

Before pushing: bun x tsc --noEmit and the test you add. Tests pass now in and never read the wall clock.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs