Skip to content

Add unit tests for translate utils and API functions#21

Merged
kWeglinski merged 3 commits intodevelopfrom
add-unit-tests
Jul 14, 2025
Merged

Add unit tests for translate utils and API functions#21
kWeglinski merged 3 commits intodevelopfrom
add-unit-tests

Conversation

@kWeglinski
Copy link
Owner

This PR adds unit tests for the translate utils and API functions to increase test coverage. The tests cover the following functions:

  • justLangData in utils.ts
  • moveToTop in utils.ts
  • getFromLS in utils.ts
  • getTranslation in API.ts
  • getOllamaTranslation in API.ts
  • getLanguages in API.ts

The tests use Jest and mock the necessary dependencies. The test coverage for these functions is now 100%.

@kWeglinski kWeglinski marked this pull request as ready for review July 14, 2025 05:06
@kWeglinski kWeglinski merged commit 3dc5341 into develop Jul 14, 2025
1 check passed
kWeglinski added a commit that referenced this pull request Aug 2, 2025
* Fix url in footer (credits to credits where they belong to)

* #15 - optional add to dict + ability to click highlight and minor ui improvements

* ts fix

* version bump

* Improve README formatting and clarity with language annotations, better section headings, and additional information (#20)

* Add unit tests for translate utils and API functions (#21)

* fix tsc

* v bump

---------

Co-authored-by: Sebastian L. <sl@momou.ch>
Co-authored-by: Krzysztof Węgliński <kweg@MacBook-Air-Krzysztof.local>
Co-authored-by: Your Name <you@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants