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

Fix utils: getTypedArray unit test. #23258

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

takahirox
Copy link
Collaborator

@takahirox takahirox commented Jan 17, 2022

Fixes: #23257

Description

getTypedArray() unit test fails on browsers with ReferenceError: Buffer is not defined error while the test passes on Node.js.

I think Buffer is Node.js specific. Better to replace it with ArrayBuffer which is available on both Node.js and browsers.

Basically the test just does new TypedArray( buffer ) and check the instance type. I don't think replacing with ArrayBuffer is problematic.

Refer to #23257 for the problem.

Buffer is Node.js specific and the unit test fails on browsers.
Better to replace it with ArrayBuffer which is available on both
Node.js and browsers.
@Mugen87 Mugen87 added this to the r137 milestone Jan 17, 2022
@Mugen87 Mugen87 merged commit 475b5d1 into mrdoob:dev Jan 17, 2022
@takahirox takahirox deleted the FixGetTypedArrayUnitTest branch January 18, 2022 00:51
@mrdoob
Copy link
Owner

mrdoob commented Jan 18, 2022

Thanks!

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.

getTypedArray unit test fails on browsers
3 participants