Add some tests#202
Open
MoellJ wants to merge 2 commits into
Open
Conversation
Owner
|
Although I agree that tests are important, some of these tests seem so simple that they aren't warranted. For instance, describe("convertToLongLat", () => {
it("converts valid LatLngTuple to [lng, lat] array", () => {
const input: LatLngTuple = [35, 139];
const result = convertToLongLat(input);
expect(result).toEqual([139, 35]);
});
it("handles negative coordinates", () => {
const input: LatLngTuple = [-33, -151];
const result = convertToLongLat(input);
expect(result).toEqual([-151, -33]);
});
});For me, I would prefer excluding minor tests like with the above. Could you try to prune through the ones you've suggested to see which tests don't deal with any potentially problematic code, please? |
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.
To get aquanited with the code base in preperation for #192 this PR adds some tests for:
(Related to #36 but only covers some parts of the code)
(Disclaimer: I'm not super experienced with web development and used LLMs for the first drafts of these tests but rewrote most of the code myself.)