AndrewUsher / AndrewUsher/obsidian-dynatrace-dql

Add comprehensive unit tests for DQL tokenizer and highlighter

Offen
#6 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
ci-cd, testing-qa
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.