Skip to content

Commit

Permalink
build: update [email protected] (#1589)
Browse files Browse the repository at this point in the history
* build: update @mapbox/[email protected] [email protected]

* fix: define TextDecoder so tests pass with mapbox-gl 3
  • Loading branch information
paulschreiber authored Mar 7, 2024
1 parent 5a07465 commit 4eaa6e4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"js-cookie": "^3.0.5",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"mapbox-gl": "^2.15.0",
"mapbox-gl": "^3.1.2",
"notistack": "^3.0.1",
"path-browserify": "^1.0.1",
"query-string": "^7.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import * as util from 'util';
import { act, fireEvent, render, screen, waitFor, within } from 'tests/utils';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
Expand All @@ -29,6 +30,13 @@ import {
MAP_DATA_ACCEPTED_EXTENSIONS,
} from 'config';

// mapbox-gl 3.x no longer has TextDecoder defined
// https://github.com/mapbox/mapbox-gl-js/issues/13027
Object.defineProperty(window, 'TextDecoder', {
writable: true,
value: util.TextDecoder,
});

jest.mock('terraso-client-shared/terrasoApi/api');
jest.mock('sharedData/visualization/visualizationMarkers');
jest.mock('react-router-dom', () => ({
Expand Down

0 comments on commit 4eaa6e4

Please sign in to comment.