Add unit tests for api/validators language code validation - #99
Merged
Merged
Conversation
Member
|
I think we're good to not have a changelog entry for this one :) @DeleMike, could you take a look? |
Collaborator
Author
|
@andrewtavis added a changelog entry before I saw your comment! Let me know if I should take it out :) |
andrewtavis
reviewed
Sep 19, 2026
|
|
||
| - Basic health and CORS test scaffolding was added for the API ([#29](https://github.com/scribe-org/Scribe-Server/pull/29)). | ||
| - The CI workflow was updated to select the Go version via `go-version-file` ([#8](https://github.com/scribe-org/Scribe-Server/issues/8)) and later improved further ([#30](https://github.com/scribe-org/Scribe-Server/issues/30)). | ||
| - - Unit tests were added for the language validator functions ([#78](https://github.com/scribe-org/Scribe-Server/issues/78)). |
Member
There was a problem hiding this comment.
note: Totally fine to include this, @shabicha, but let's remove the extra - :)
Collaborator
Author
There was a problem hiding this comment.
Sounds good! I removed the extra -
Collaborator
|
merging... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
./pre-commitexecutable as well asmake lintand have fixed all reported issuesDescription
Added
language_validator_test.goforapi/validators/language_validator.gowith table-driven unit tests forIsValidLanguageCode,SanitizeLanguageCode,IsLanguageSupported,IsValidTranslationLangCodeandInitLanguageValidator.Coverage
Scribe server test coverage increased from 3.4% to 5.6%.
All five functions in
language_validator.goare at 100%.Closes #78