How do I wait for an exec process to finish in Jest?
0 I have the following test, but I can't seem to get Jest to wait for my exec call to finish running: var exec = require('child_process').exec test('render', async () => await exec('./render.local.sh', (err, out) => console.log(err, out) expect(...some file to be created) ); ) What should I do to make jest wait for the exec callback to be called? node.js jestjs share | improve this question edited Nov 12 '18 at 20:05 skyboyer 3,336 1 11 28 asked Nov 12 '18 at 19:15 Toli 2,051 4 19 35 add a comment | 0 I have the following test, but I can't seem to get Jest to wait for my exec call to finish running: var exec = require('child_process').exec test('render', async () => await exec('./render.local.sh', (err, out) => console.log(err, out) expect(...some file to be created) ); ) What should I do to make jest wait for the exec callba...