Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for the typeguards #570

Merged
merged 9 commits into from
May 11, 2023
Merged

Conversation

KaiVolland
Copy link
Contributor

@KaiVolland KaiVolland commented Apr 26, 2023

This fixes some typeguards and adds a lot of tests to check if the typeguards return the expected true/false for many different cases.

@KaiVolland KaiVolland marked this pull request as ready for review April 27, 2023 09:50
@KaiVolland KaiVolland requested a review from jansule April 27, 2023 10:19
Copy link
Contributor

@marcjansen marcjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, only nit-pick comments.

style.ts Outdated Show resolved Hide resolved
style.ts Outdated Show resolved Hide resolved
(got.max ? isFilter(got.max) : true);
return !!((got?.min || got?.max) &&
((!!got.min) ? isGeoStylerNumberFunction(got.min) || _isNumber(got.min) : true) &&
((!!got.max) ? isGeoStylerNumberFunction(got.max) || _isNumber(got.min) : true));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extremely hard to read

Co-authored-by: Marc Jansen <jansen@terrestris.de>
@KaiVolland KaiVolland merged commit fa9baee into geostyler:master May 11, 2023
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