Sunday, 29 July 2018

Question: How to test async callback parameter?

Trying to test within the exec functions callback parameter but can't work out for the life of me how. What exactly am I missing?Test-framework I'm using is jest if that helps.fnc() { const childProcess = this.exec(cmd, (error) => { if (error) { throw error; } }); } Thanks in advance of any help or guidance.

Submitted July 29, 2018 at 10:34PM by MartialArtGains

No comments:

Post a Comment