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

Cover Rectangle with unit Tests #8144

Merged
merged 5 commits into from
Apr 19, 2022
Merged

Conversation

stephenspol
Copy link
Contributor

@stephenspol stephenspol commented Apr 16, 2022

Tests cover initialize and setBounds. Most tests mirrored PolygonSpec.js but had to drop a few tests. Some tests that were mirrored from Polygon now fail such as an empty array fails when initializing and setting bounds. I am assuming this is because of _boundsToLatLngs being overwritten as lat throws an error due to being undefined. Rectangle also fails when putting more than 2 coords, not sure if this is attended.

Please let me know if anything needs to be changed.

PR closes #8140.

- Tested initializing
- Tested setBounds
- Mirrored most tests from PolygonSpec.js
.only was used for testing purposes only.
Has been removed
Copy link
Member

@Falke-Design Falke-Design left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

spec/suites/layer/vector/RectangleSpec.js Outdated Show resolved Hide resolved
spec/suites/layer/vector/RectangleSpec.js Outdated Show resolved Hide resolved
spec/suites/layer/vector/RectangleSpec.js Outdated Show resolved Hide resolved
spec/suites/layer/vector/RectangleSpec.js Outdated Show resolved Hide resolved
spec/suites/layer/vector/RectangleSpec.js Outdated Show resolved Hide resolved
- Removed holes tests as they are not necessary
- Skipping empty array tests as it throws error
- Changed multiple coords test to extending bounds
- Added function () in expectation
- Removed skip
@Malvoz Malvoz added the tests label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rectangle tests are missing
4 participants