Skip to content

Spec 013 T023: seven more content-service specs, in TypeScript - #649

Merged
adamjohnwright merged 2 commits into
mainfrom
spec013/t023-content-3
Oct 24, 2026
Merged

adamjohnwright merged 2 commits into
mainfrom
spec013/t023-content-3

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 013, T023, batch 4 of the .mjs specs. Batch 3 was #647.

What changed. Seven content-service specs are converted: contained-events, pathways-of, flag, query-attribute, discover, diagram-search and references-mapping. They held 235 errors with checkJs on. Each is now a typed .ts spec, held at zero on both counts.

As before:

  • the servers and stand-in graphs are typed, with the parameters the tests read by name declared;
  • JSON answers are read as the shape Java writes;
  • recorded queries and requests are read through helpers that throw when there is none.

New in this batch:

  • The stand-in Solr (pathways-of, flag, diagram-search) is typed once: its form as [name, value] pairs, and its URL never undefined.
  • discover reads schemaDataSet's answer through one typed view, since NON_EMPTY leaves fields out.
  • query-attribute maps its fixtures through a helper that fails when a node is not mapped, and asks only for getters that must exist.
  • A test asserting a field is absent (diagram-search's fireworksSpecies) takes the first entry through a helper that throws when there is none, so an empty answer still fails, as it did before.

Checked:

  • The old .mjs versions and the new .ts ones each run the same 82 tests, all passing.
  • Types pass, and lint (1,329 warnings) and dead code (131) are unchanged.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits October 24, 2026 03:14
Batch 4 of the .mjs specs: contained-events, pathways-of, flag,
query-attribute, discover, diagram-search and references-mapping -- 235
errors with checkJs on. Each is now a .ts spec, typed and held at zero on
both counts.

As before: servers and stand-in graphs typed, the parameters read by name
declared, JSON answers read as the shape Java writes, recorded queries and
requests read through helpers that throw when there is none. New here:

- the stand-in Solr (pathways-of, flag, diagram-search) typed once: its
  form as [name, value] pairs, its URL never undefined;
- discover reads schemaDataSet's answer through one typed view, since
  NON_EMPTY leaves fields out;
- query-attribute maps its fixtures through a helper that fails when a node
  is not mapped, and asks for getters that must exist;
- a test asserting a field is absent (diagram-search's fireworksSpecies)
  takes the first entry through a helper that throws when there is none,
  so an empty answer still fails as it did.

Same 82 tests as the .mjs versions, all passing; types, lint (1,329) and
dead code (131) unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 90f3960 into main Oct 24, 2026
7 checks passed
@adamjohnwright
adamjohnwright deleted the spec013/t023-content-3 branch October 24, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant