ankidroid/Anki-Android

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

Open

#13.283 aperta il 16 feb 2023

Vedi su GitHub
 (37 commenti) (0 reazioni) (0 assegnatari)Kotlin (2789 fork)batch import
Good First IssueKeep OpenTests

Metriche repository

Star
 (11.132 star)
Metriche merge PR
 (Merge medio 9g 12h) (93 PR mergiate in 30 g)

Descrizione

[!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.
  2. Post the test(s) that you're handling on this issue, so people don't duplicate work
  3. Write a unit test (/test, not /androidTest)
  4. Ensure that re-introducing the bug or issue would break the test
  5. Submit a Pull Request

Guida contributor