lundi 5 février 2018

Jest mocks for dgram

I am just learning Jest (testing framework) and need to mock dgram (for Node). Really, I haven't the slightest clue how to do this, when there is functionality like this: this._udp = dgram.createSocket('udp4') Has anyone mocked dgram before and would like to share? I have been searching the internet and have not found anything.

Aucun commentaire:

Enregistrer un commentaire