test: isMessageSequential in layout_editor has no coverage
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
- Ambito
- testing
Direzione di ricerca
Il file da testare è packages/layout_editor/src/lib/isMessageSequential.js. Guarda il test esistente per generateThemeFromColor.js nella stessa cartella per comprendere le convenzioni di node:test e node:assert/strict. Scrivi un file di test chiamato isMessageSequential.test.js che copra gli scenari elencati: nessun messaggio precedente, stesso utente entro l'intervallo di raggruppamento, utenti diversi, intervallo più ampio dell'intervallo di raggruppamento, messaggi di sistema, groupable: false, alias diverso e un confine giornaliero. Esegui yarn test per assicurarti che la suite layout_editor passi. Fatto quando il nuovo file di test esiste e tutti i test passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
packages/layout_editor/src/lib/isMessageSequential.js has no test file, while generateThemeFromColor.js beside it does (yarn test → node --test src/lib/*.test.js).
It decides message grouping — same author, same alias, not a system message, groupable !== false, within the grouping range, and the same calendar day — and none of those branches are currently covered.
I'd like to add src/lib/isMessageSequential.test.js following the existing node:test / node:assert/strict conventions in that folder, covering:
- no previous message
- same user inside the grouping range (the grouping case)
- different users
- a gap wider than the grouping range
- system messages (
tset on either message) groupable: false- differing
alias - a day boundary inside the grouping range
No source changes — test file only.
I've written it locally already: the full layout_editor suite passes 25/25 with it, and removing the !isMessageNewDay guard from the source makes the new day-boundary test fail, so it isn't a test that passes when the behaviour is broken.
Happy to open the PR — checking here first rather than sending an unannounced one.
- Lingua principale
- JavaScript
- Stelle
- 165
- Fork
- 381
- Merge medio
- 1g 2h
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 RocketChat/EmbeddedChat
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
RocketChat/EmbeddedChat#1360 · 1 commento ·
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every call Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
RocketChat/EmbeddedChat#1317 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
RocketChat/EmbeddedChat#1315 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RocketChat/EmbeddedChat#1313 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
RocketChat/EmbeddedChat#1294 ·
Tutte le issue di RocketChat/EmbeddedChat
Issue simili
-
Update HugeIcons library Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
antfu-collective/icones#398 ·
-
ECmail.com Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
wesbos/burner-email-providers#554 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
components-web-app/docs#92 ·