I've implemented a test case for my upload component which shows error if file.size more than 1 mb.
Is there a way to monkeypatch file size with jest or just js for getting test failing without creating the file like this?
const file = new File(
[new Blob(['1'.repeat(1024 * 1024 + 1)], { type: 'image/png' })],
'darthvader.png'
)