-
-
Notifications
You must be signed in to change notification settings - Fork 363
Open
Description
I create the react components form .glb files using gltfjsx package. And I make some changes like adding event handlers and adding refs.
The React component works fine in dev environment. But cannot render the component from unit testing.
Test case:
test("render" , async () => {
const mechClickHandler = jest.fn();
const props = {
position: new Vector3(0, 0, 0),
slotNumber: 1,
cardName: "HCPSLine22",
onMeshClick: mechClickHandler,
ports: cardData.ports,
cardType: "HCPSLine22",
card: cardData,
expanded: false,
ejected: false,
};
render(<HCPSLine22 {...props} />)
})
And Im facing below issue,
TypeError: Cannot destructure property 'nodes' of '(0 , _drei.useGLTF)(...)' as it is undefined.
Aim: I looking to test the events fired from component
Can someone help here?
Metadata
Metadata
Assignees
Labels
No labels