pdfMake .getBuffer doesnt work in jest test

To test pdf i need to get buffer after generating it. But .getBuffer() doesnt seem to work in test environment.

Now I’m trying to at least banally output the buffer to the console, but nothing is showing. But when i run my app and try to run this code it works like it should and i see buffer in output. Why its not working in jest? Document generates correct neither getBuffer() nor getBlob() doesnt work when i call.

Idk if it will help bu theres my code example

describe('pdf should generate right', () => {
    it('should generate right document', async () => {

        const genDoc = await GenerateDocument(dd); // <- returns document created with .createPdf()

        genDoc.getBuffer((buffer)=>{
            console.log(buffer);  // < - doesnt output anything
        })

    })
})