[openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)
Emin Kocan
notifications at github.com
Sat Oct 12 18:42:23 UTC 2024
> I suppose the issues listed below are a result of the changes in #5084. I would simply fix the respective unit tests to re-align them with the current implementation.
>
> ```
> 1) OSM .formatHash formats lat/lon/zoom params
> Failure/Error: expected '#map=9/57.625/-3.685' to equal '#map=9/57.6247/-3.6845'
>
> 2) OSM .formatHash respects zoomPrecision
> Failure/Error: expected '#map=5/57.62/-3.68' to equal '#map=5/57.625/-3.685'
>
> 3) OSM .formatHash formats layers params
> Failure/Error: expected '#map=9/57.625/-3.685&layers=C' to equal '#map=9/57.6247/-3.6845&layers=C'
>
> 4) OSM .formatHash ignores default layers
> Failure/Error: expected '#map=9/57.625/-3.685' to equal '#map=9/57.6247/-3.6845'
>
> 5) OSM .zoomPrecision suggests 0 digits for z0-1
> Failure/Error: expected 1 to equal 0
>
> 6) OSM .zoomPrecision suggests 3 digits for z5-8
> Failure/Error: expected 2 to equal 3
>
> 7) OSM .zoomPrecision suggests 4 digits for z9-16
> Failure/Error: expected 3 to equal 4
>
> 8) OSM .zoomPrecision suggests 5 digits for z17-20
> Failure/Error: expected 6 to equal 5
>
> 9) OSM .locationCookie creates a location cookie value
> Failure/Error: expected '-3.685|57.625|9|M' to equal '-3.6845|57.6247|9|M'
>
> 10) OSM .locationCookie respects zoomPrecision
> Failure/Error: expected '-3.685|57.625|9|M' to equal '-3.6845|57.6247|9|M'
> ```
Thank you for linking the PR so I could update the tests according to new implementation. All tests should be passing now. I also added running javascripts tests command to `CONTRIBUTING.md`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5216#issuecomment-2408656554
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5216/c2408656554 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241012/e98bc49f/attachment.htm>
More information about the rails-dev
mailing list