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

set-up threejs testing #90

Merged
merged 1 commit into from
Feb 24, 2023
Merged

set-up threejs testing #90

merged 1 commit into from
Feb 24, 2023

Conversation

Bryanz2019
Copy link
Contributor

Initial Issue: Cannot find Module 'three/addons/exporters/GLTFExporter.js'
Possible Cause?: facebook/create-react-app#2537 or library path issue
Attempt Solution (failed): customize jest.config with transformIgnorePatterns
Final Solution: import gltfexporter from a different source

Initial Issue: ResizeObserver is not supported in this browser out of the box
HandleBlur prop cannot be recognized on a DOM element
Possible Cause?: https://github.com/pmndrs/react-use-measure#resize-observer-polyfills
ZeeCoder/use-resize-observer#40
Attempt Solution (failed): mocking ResizeObserver with jest
Temporary Solution: Avoid using render for now
Test with Enzyme's shallow copy to isolate the component

Initial Issue: model rendered with missing context
Attempt Solution (failed): pass in context from App; modify undefined context
Final Solution: modify the structure of Model.js to accept the default context

@Bryanz2019
Copy link
Contributor Author

The rest of the testing on the mesh object could be done by passing in different prop value

Copy link
Contributor

@christinetu15 christinetu15 left a comment

Choose a reason for hiding this comment

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

looks good! don't forget to update the testing.md doc to say you used enzyme. thanks!

@Bryanz2019 Bryanz2019 merged commit cd89f69 into main Feb 24, 2023
@Bryanz2019 Bryanz2019 linked an issue Mar 10, 2023 that may be closed by this pull request
2 tasks
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.

add component test
2 participants