You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a ton of tests that have a hardcoded glTF object, which itself isn't bad, but these tests also try and mock the pipeline extras added to loaded models. At best, this mocking causes the tests to be fragile because what constitutes the extras object can change int he future and these tests won't be updated (this has already happen). In many cases, the mocks are now incorrect and the tests aren't actually testing the right thing. For example, there are a lot of buffers being used for extras._pipeline.source which is actually a string (what was the cause of #297) but other files, such as compressTextureCoordinatesSpec.js are making the same mistake.
Hardcoding small valid glTFs is fine in most cases, but tests should never mock the pipeline extras and should instead call addPipelineExtras. (In general we should avoid mocks unless they are really needed).
@lilleyse I'm not sure who we have available, but it would be nice for someone to work on this soon. Both me and @tfili have ran into bugs every time we use gltf-pipeline. I think fixing our tests might help track a bunch of them down or at least stop things from getting worse.
The text was updated successfully, but these errors were encountered:
If this can be done in less than a day, let's do it soon but post glTF 2.0; otherwise, we need to wait until we have a bigger gltf-pipeline effort (perhaps not that far off) or a community contributor.
There are a ton of tests that have a hardcoded glTF object, which itself isn't bad, but these tests also try and mock the pipeline extras added to loaded models. At best, this mocking causes the tests to be fragile because what constitutes the extras object can change int he future and these tests won't be updated (this has already happen). In many cases, the mocks are now incorrect and the tests aren't actually testing the right thing. For example, there are a lot of
buffers
being used forextras._pipeline.source
which is actually a string (what was the cause of #297) but other files, such ascompressTextureCoordinatesSpec.js
are making the same mistake.Hardcoding small valid glTFs is fine in most cases, but tests should never mock the pipeline extras and should instead call
addPipelineExtras
. (In general we should avoid mocks unless they are really needed).@lilleyse I'm not sure who we have available, but it would be nice for someone to work on this soon. Both me and @tfili have ran into bugs every time we use
gltf-pipeline
. I think fixing our tests might help track a bunch of them down or at least stop things from getting worse.The text was updated successfully, but these errors were encountered: