Closed ibgreen closed 1 year ago
- MVTLoader tests fail under Safari
It's this test that's failing.
Specifically it looks like there are some float precision errors in Safari. The created geojson is expected to match this file. In this screenshot the first console.log
is the geojson decoded from MVT, and the latter is what's expected to match. There are several such differences.
So I'd guess a good solution would be to use some epsilon instead of strict equality for float checking here?
Thanks for investigating, this makes sense. It is not really a bug then, but nevertheless, it would be good to get a clean test run.
There is a test/utils/tape-assertions
that exports tapeEqualsEpsilon(t, value, expected, epsilon, message)
,
yarn test browser, open localhost:5000 in Safari
) P1 @kylebarron @jesusbotella