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
Unless I'm missing something, logs deprecation warning for use of BATCHID without prefixed underscore is a bad test. Here's the full test:
it('logs deprecation warning for use of BATCHID without prefixed underscore',function(){vardeprecationWarningSpy=jasmine.createSpy(deprecationWarning);returnCesium3DTilesTester.loadTileset(scene,withBatchTableUrl).then(function(tileset){expect(deprecationWarningSpy).toHaveBeenCalled();Cesium3DTilesTester.expectRenderTileset(scene,tileset);});});
expect(deprecationWarningSpy).toHaveBeenCalled(); will always fail because you can't create a spy on a freestanding function like this. Basically var deprecationWarningSpy = jasmine.createSpy(deprecationWarning); is a no-op since deprecationWarningSpy is never used. When the internal Cesium code is ran, it always calls the real deprecationWarning. If you want to spy on deprecation warning, you need to create a private inner function like we do with loadWithXhr.
I'm not sure how this code got into 3d-tiles since the test never passes when ran locally (it doesn't run on the server because it's WebGL).
Unless I'm missing something,
logs deprecation warning for use of BATCHID without prefixed underscore
is a bad test. Here's the full test:expect(deprecationWarningSpy).toHaveBeenCalled();
will always fail because you can't create a spy on a freestanding function like this. Basicallyvar deprecationWarningSpy = jasmine.createSpy(deprecationWarning);
is a no-op sincedeprecationWarningSpy
is never used. When the internal Cesium code is ran, it always calls the realdeprecationWarning
. If you want to spy on deprecation warning, you need to create a private inner function like we do withloadWithXhr
.I'm not sure how this code got into 3d-tiles since the test never passes when ran locally (it doesn't run on the server because it's WebGL).
CC @lilleyse @pjcozzi
The text was updated successfully, but these errors were encountered: