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

Tests: Unit Tests for Lights #25393

Merged
merged 15 commits into from
Feb 1, 2023
Merged

Tests: Unit Tests for Lights #25393

merged 15 commits into from
Feb 1, 2023

Conversation

epreston
Copy link
Contributor

@epreston epreston commented Feb 1, 2023

Related issue: none.

Description

This cleans up the unit tests for Lights.
Adds missing unit test files, fills in some unit tests, populates the missing member tests with stubs. Explicit block scope for variables used in tests.

AmbientLight extends from Light.
AmbientLight.type should be AmbientLight.
AmbientLight.isAmbientLight should be true.
Correct module name.
Add AmbientLightProbe unit tests.
AmbientLightProbe extends from LightProbe.
AmbientLightProbe.isAmbientLightProbe should be true
DirectionalLight extends from Light.
DirectionalLight.type should be DirectionalLight.
DirectionalLight.isDirectionalLight should be true.
Stub missing member tests.
DirectionalLightShadow extends from LightShadow.
DirectionalLightShadow.isDirectionalLightShadow should be true.
HemisphereLight extends from Light.
HemisphereLight.type should be HemisphereLight.
HemisphereLight.isHemisphereLight should be true.
Add HemisphereLightProbe unit tests.
HemisphereLightProbe extends from LightProbe.
HemisphereLightProbe.isHemisphereLightProbe should be true.
Light extends from Object3D.
Light.isLight should be true.
Stub missing member tests.
Add LightProbe unit tests.
LightProbe extends from Light.
LightProbe.isLightProbe should be true.
Stub missing member tests.
PointLight extends from Light.
PointLight.type should be PointLight.
PointLight.isPointLight should be true.
Stub missing member tests.
Add PointLightShadow unit tests.
PointLightShadow extends from LightShadow.
PointLightShadow.isPointLightShadow should be true.
SpotLightShadow extends from LightShadow.
SpotLightShadow.isSpotLightShadow should be true.
Stub missing member test.
SpotLight extends from Light.
SpotLight.type should be SpotLight.
SpotLight.isSpotLight should be true.
Stub missing member tests.
RectAreaLight extends from Light.
RectAreaLight.type should be RectAreaLight.
RectAreaLight.isRectAreaLight should be true.
Add power / Intensity tests.
Make tests more robust.
@mrdoob mrdoob added this to the r150 milestone Feb 1, 2023
@mrdoob mrdoob merged commit df181a2 into mrdoob:dev Feb 1, 2023
@epreston epreston deleted the tests-lights-cleanup branch February 1, 2023 07:43
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.

None yet

2 participants