react-map-gl icon indicating copy to clipboard operation
react-map-gl copied to clipboard

Fix tests and prevent errors when removing the map

Open josh-cloudscape opened this issue 2 years ago • 1 comments

chore(deps): revert @deck.gl/layers to 8.8.9

This fixes the tests that were failing. It looks like @deck.gl uses dependencies that were converted to esm modules and jest isn't currently set up to handle them.

Jest encountered an unexpected token
...
/home/runner/work/react-map-gl/react-map-gl/node_modules/@deck.gl/layers/node_modules/@mapbox/tiny-sdf/index.js:3
export default class TinySDF {
^^^^^^

SyntaxError: Unexpected token 'export'

Reference: https://github.com/visgl/deck.gl/issues/7735


fix(image): don't add images if map or component is unloaded

Prevents errors when unmounting the map while images are still loading.

josh-cloudscape avatar Mar 13 '23 01:03 josh-cloudscape

Codecov Report

Patch coverage: 85.71% and project coverage change: -0.25 :warning:

Comparison is base (f58539a) 97.96% compared to head (584e8e0) 97.72%.

:exclamation: Current head 584e8e0 differs from pull request most recent head 36cb600. Consider uploading reports for the commit 36cb600 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
- Coverage   97.96%   97.72%   -0.25%     
==========================================
  Files          28       28              
  Lines         738      746       +8     
  Branches      189      191       +2     
==========================================
+ Hits          723      729       +6     
- Misses         11       13       +2     
  Partials        4        4              
Impacted Files Coverage Δ
src/components/Image/index.js 95.55% <85.71%> (-4.45%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Mar 13 '23 01:03 codecov[bot]