AndrewUsher / AndrewUsher/obsidian-dynatrace-dql

Add comprehensive unit tests for DQL tokenizer and highlighter

Aperta
#6 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The plugin currently has no visible test suite. Adding tests would improve code reliability and make it easier to add new features without regressions.

**Proposed Changes:**
- Create unit tests for the DQL tokenizer (`nextToken` function)
- Add tests for edge cases (nested comments, escaped quotes, duration literals)
- Test the highlighting logic with various DQL syntax scenarios
- Add tests for command parsing and validation
- Set up CI/CD to run tests on pull requests

**Benefits:**
- Catch regressions early when adding new features
- Document expected behavior through tests
- Make it easier for contributors to add enhancements safely
- Improve code maintainability and refactoring confidence

**Related Code:**
Tests should cover `src/dql-highlight.ts` and command logic in `src/main.ts`. Consider using Jest or Vitest for testing.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by reading src/dql-highlight.ts, especially the nextToken function, and src/main.ts for command parsing and validation. Choose Jest or Vitest, then define tests for nested comments, escaped quotes, duration literals, highlighting scenarios, and command behavior. Done means the tokenizer, highlighter, and commands have regression coverage and tests run on pull requests.

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

Valutazione

Stack tecnologico
typescript
Ambito
ci-cd, testing-qa
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.