NASA-AMMOS / 3DTilesRendererJS

Renderer for 3D Tiles in Javascript using three.js
https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mars.html
Apache License 2.0
1.63k stars 291 forks source link

Issue with "Test suite failed to run" #797

Closed volodymyrprotskiy closed 1 month ago

volodymyrprotskiy commented 1 month ago

Hi, all!

I have run my Jest test after updating the 3d-tiles-renderer from v0.3.31 to v0.3.38, and an error occurred. Could someone help here?

The error message: "Test suite failed to run. ReferenceError: TextDecoder is not defined."

Screenshot 2024-10-09 at 17 59 00
gkjohnson commented 1 month ago

If TextDecoder isn't available then you're likely using an outdated version of node.js.

volodymyrprotskiy commented 1 month ago

I use "jsdom" as test environment

gkjohnson commented 1 month ago

If you've made modifications to the project you're not stating here then I can't help. The tests run with the versions of node used in the ci.

volodymyrprotskiy commented 1 month ago

I just use the lib in my own project

gkjohnson commented 1 month ago

Sorry - I see you're running tests in you're own project. If you're following the set up that jest and jsdom suggest then you'll need to report an issue at those repositories. TextDecoder is a valid JS class in the browser and node.js.

volodymyrprotskiy commented 1 month ago

The issue is related only to 0.3.38 version of the 3d-tiles-renderer lib, so I assume you can help me here

gkjohnson commented 1 month ago

The project was updated to use TextDecoder in prior version, which has been available for years, which is why it wouldn't have happened previously if that class is an issue for some reason. Unfortunately I can't help if your test environments are not working with browser-compatible javascript. Again, I would ask at the appropriate places for help with your test environment set up.

volodymyrprotskiy commented 1 month ago

The tests is running well with 3d-tiles-renderer v0.3.31, and only after updating the lib to v0.3.38 the issue with TextDecoder occured.