test(test-renderer): cover the equirect background path in the mock GL contract test - #3866
Open
ShreeBohara wants to merge 1 commit into
Open
test(test-renderer): cover the equirect background path in the mock GL contract test#3866ShreeBohara wants to merge 1 commit into
ShreeBohara wants to merge 1 commit into
Conversation
…L contract test The contract assertions poke the mock directly. This adds the case from pmndrs#3821 that drives the path pmndrs#3820 actually broke: an equirect background resolves through PMREMGenerator, which binds a framebuffer-backed render target, so three reaches WebGLState.drawBuffers() with a handle the mock produced. Verified it discriminates: against the pre-pmndrs#3822 `() => {}` stub it fails with "TypeError: Invalid value used as weak map key", the original pmndrs#3820 error. Closes pmndrs#3845 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3845.
#3821's source change was superseded by #3822. This is the half you asked to keep.
What it covers. The existing assertions call the mock directly. This case renders an equirect background through three, which resolves through PMREMGenerator and binds a framebuffer-backed render target, so
WebGLState.drawBuffers()receives a handle the mock actually produced.It discriminates. Against the pre-#3822
() => {}stub it fails withTypeError: Invalid value used as weak map key— the #3820 error, raised synchronously rather than as a flake. It passes on current v10.Placement. Added to
WebGL2RenderingContext.test.tsrather than restoringRTTR.webgl2.test.tsas its own file. You offered either. The other two tests in my original file — WeakMap-keyability and distinct-per-call — are already covered by your contract test, so a separate file would have been mostly duplication. Happy to split it out if you'd rather it stand alone.Full suite: 48 files, 606 passed. Coverage 81.32% lines, against the 78 threshold.
Not fixed here:
createVertexArrayOESin thegetExtensionobject still returnsundefined. Same class of bug, different path, and the WebGL2 render path never reaches it — out of scope for this.