Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock deprecation warning function to fix failing test #4809

Merged
merged 2 commits into from
Jan 4, 2017

Conversation

lasalvavida
Copy link
Contributor

@mramato, fix for #4803

Cesium3DTilesTester.expectRenderTileset(scene, tileset);
});
var called = false;
var originalDeprecationWarning = Batched3DModel3DTileContent._deprecationWarning;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of overriding the function manually, use spyOn(Batched3DModel3DTileContent, '_deprecationWarning'); and then you can use expect(Batched3DModel3DTileContent._deprecationWarning).toHaveBeenCalled() in the then and there's no reason to have an otherwise or have to manually set it back.

@lasalvavida
Copy link
Contributor Author

Updated

@mramato
Copy link
Contributor

mramato commented Jan 4, 2017

Thanks!

@mramato mramato merged commit c32b793 into CesiumGS:3d-tiles Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants