test: rename fixture identifiers built on a private product's abbreviation

Merged
BO
2mo ago
+18-18

Test fixtures in two files still used identifiers built on a private product's abbreviation. PR #482 generalized the docs but left these. This renames them to neutral names; no behavior changes.

Changes

  • __tests__/window-message-synthesizer.test.ts: the event constants, the publisher, listener and receiver function names and the expected event name now use DEMO_AJAX_EVENT, DEMO_OTHER_EVENT, publishDemoLivewire, listenForDemoLivewireAjax and receiveDemoSnapshot.
  • __tests__/near-duplicates.test.ts: the third copy of the fixture function is now webUrlOf in src/web.ts, with the label string web.
  • src/graph/near-duplicates.ts: the doc comment's example name is webUrlOf.

Choices

  • webUrlOf rather than demoUrlOf: the test compares a name-sorted list that includes dsUrlOf, and demoUrlOf sorts before dsUrlOf, which would have forced a reordered expected value. web has the same length as the old name and sorts after ds, so no expected value changes.
  • No expected similarity score, path or line number changed. The similarity assertions are range checks (>= 0.8, < 0.3) and still hold.

Verification

  • Before: a case-insensitive git grep for the abbreviation listed 18 text lines in these three files. It also matched binary PNGs and two lockfile integrity hashes, which are byte coincidences, not occurrences.
  • After: the same search lists only the PNG and lockfile coincidences.
  • vitest run __tests__/near-duplicates.test.ts __tests__/window-message-synthesizer.test.ts: 2 files, 10 tests passed, exit 0.
  • npm run check:agent-docs: exit 0.

README rows checked: none apply; no user-visible feature, command, tool, language or number changed.


Summary by cubic

Renames test fixture identifiers built on a private product's abbreviation to neutral names so the tests no longer reference a non-public product. No behavior changes.

webUrlOf replaces the near-duplicate fixture's name in src/web.ts instead of demoUrlOf, keeping the expected name-sorted results unchanged.

Summary by CodeRabbit

  • Tests
    • Updated duplicate-detection checks to use web URLs, including listings, tool output, recomputation, older indexes, and sync deletions.
    • Updated message-synthesis test examples and expected results to use demo event names.
  • Documentation
    • Updated a duplicate-detection example to reference web URLs.