Hello! I'm trying to write unit tests using Jest and ReactThreeTestRenderer, but when logging the scene, I notice that none of the children are showing. Does anyone have any ideas on why this might be happening?
adding my code below:
import React from 'react';
import ReactThreeTestRenderer from '@react-three/test-renderer';
import TextField from '../src/components/TextField';
import { expect, jest, test, describe, it } from '@jest/globals';
import '@testing-library/jest-dom';
describe('TextField', () => {
test('component does render', async () => {
const render = await ReactThreeTestRenderer.create(<TextField />);
console.log(render.scene);
});
});
What is your question:
Hello! I'm trying to write unit tests using Jest and ReactThreeTestRenderer, but when logging the scene, I notice that none of the children are showing. Does anyone have any ideas on why this might be happening?
adding my code below:
this is what logs:
TextField component for reference