Raise test coverage of `BaseValidator`

Aperta
#44 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@sumitkhond111-del ci sta già lavorando.

Dal 4/12/2026.

  • #46 di @sumitkhond111-del — aperta
  • #48 di @nijamgouri60 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
testing

Direzione di ricerca

Start by running npm run test:coverage and inspect the uncovered lines in src/core/BaseValidator.js. Add tests for the listed error paths and assert the actual error messages. Done means line coverage reaches at least 97% with no source changes; two open pull requests already address this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue tests

src/core/BaseValidator.js is at about 90% line coverage. The untested lines are mostly error paths: transform() throwing, min()/max() with a non-string/array/number value, patternAsync() with an input that is too long, arrayOfAsync() with a non-array, and the catch blocks in validate() and validateAsync().

Run npm run test:coverage to see the exact line numbers in the table.

Done when

  • BaseValidator.js is at 97% lines or higher
  • Tests check the actual error messages, not just isValid
  • No source changes. If you find a real bug while testing, open a separate issue.
Lingua principale
JavaScript
Stelle
0
Fork
7
Merge medio
1h 17m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aniru-dh21/snap-validate

Tutte le issue di aniru-dh21/snap-validate

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.