Share one token-link builder across tests
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- testing
Direzione di ricerca
Start in src/__tests__/test-helpers.ts beside makePhraseLink, then read the six listed test files and their existing link builders. Consolidate token-link creation while preserving status-based default ids, explicit id overrides, and overridable surface text; check whether segment-link builders are also duplicated. Run the test suite and confirm it passes unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Six test files each build approved token links with their own helper. Replace them with one makeTokenLink in src/__tests__/test-helpers.ts, beside makePhraseLink.
Today
| File | Builder | Default id | Uses |
|---|---|---|---|
analysis-repository-conformance.ts (#469) |
tokenLink(id, analysisId, tokenRef, surfaceText) |
none; the caller passes it | 4 |
types/type-guards.test.ts |
tokenLink(analysisId, status?, tokenRef?) |
ref:analysis:status |
10 |
utils/analysis-book.test.ts |
mkTokenLink(analysisId, tokenRef) |
ref:analysis |
12 |
utils/project-analysis-summary.test.ts |
mkTokenLink(analysisId, tokenRef) |
ref:analysis |
11 |
utils/reanchor-analysis.test.ts |
makeTokenLink(tokenRef, surfaceText, analysisId?) |
ref:analysis |
76 |
utils/analysis-violations.test.ts |
linkTo(analysisId, tokenRef, id?) |
tl-ref |
6 |
Watch for
- Unique default ids.
type-guards.test.tsputs the status in the id, so two links on one token and payload stay distinct. The shared default must keep that. - Explicit ids.
analysis-violations.test.tspasses the same id twice to triggerduplicateLinkId, so callers must still be able to set the id. - Surface text. Some builders default it to the token ref;
reanchor-analysis.test.tsneeds a real one for drift detection. Default it, but allow an override.
As the data layer plan lands
- Sequencing. Blocked by 1e (#434); blocks 3b (#441). 3b to 3i (#441 to #448) add parity and conformance tests that build many links, and they start on the shared builder.
- 1e (#434). Rewrites the project summaries, so
project-analysis-summary.test.tsgets consolidated as 1e leaves it. - 3b (#441).
ChangeSets are keyed by record type and id, so fixture ids must be unique and stable. - 3j (#449). Its done-when reuses the drift cases in
reanchor-analysis.test.ts, the biggest user here, for the host reanchor pass. Consolidating first lets those cases move without their own builder. - 4c (#455). Deletes the WebView reanchor passes, so
reanchor-analysis.test.tsgoes or moves with them. Whatever remains should already use the shared builder. - Segment links may have the same duplication. Check it in the same pass, and add a
makeSegmentLinkif so.
Done when
The test files build token links only through makeTokenLink, and the suite passes unchanged.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 0
- Merge medio
- 1g 20h
- PR unite (30g)
- 53
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sillsdev/interlinearizer-extension
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
sillsdev/interlinearizer-extension#419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 48/100
sillsdev/interlinearizer-extension#490 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sillsdev/interlinearizer-extension#479 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
sillsdev/interlinearizer-extension#478 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 54/100
sillsdev/interlinearizer-extension#473 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sillsdev/interlinearizer-extension
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
db-ux-design-system/core-web#8613 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug:new
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
callstackincubator/simlock#934 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gchq/LD-Explorer#286 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
foxglove/mcap#1907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno