ankidroid / ankidroid/Anki-Android

[Cleanup]: Add Tests to the code (`@NeedsTest`)

Offen
#13,283 39 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Good First Issue Keep Open Tests
Vorherrschende Sprache
Kotlin
Sterne
11.8k
Forks
2.9k
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
171

Beschreibung

> [!NOTE]
> This issue does not need to be assigned to you before you work on it

A number of paths of the code have been identified as requiring automated testing.

Typically this is regression testing: if a bug has been found, then it's useful to have a unit test which would have failed due to the bug.

1. Find a usage of `@NeedsTest`: https://github.com/ankidroid/Anki-Android/blob/main/AnkiDroid/src/main/java/com/ichi2/annotations/NeedsTest.kt
a. Ensure that the method(s) you are testing are in use.
3. Post the test(s) that you're handling on this issue, so people don't duplicate work
4. Write a unit test (`/test`, not `/androidTest`)
5. Ensure that re-introducing the bug or issue would break the test
6. Submit a Pull Request

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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