79590244

Date: 2025-04-24 09:37:21
Score: 0.5
Natty:
Report link

Utilising fireEvent I got it to work with:

const mockFile = new File(['content'], 'filename.txt', { type: 'text/plain' });
const input = screen.getByTestId('file-input') // reference your input HTMLElement here
fireEvent.change(input, { target: { files: [mockFile] } })
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Phoghelius