發表文章

目前顯示的是 1月 3, 2019的文章

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

Honduras

圖片
For the unincorporated community in Indiana, see Honduras, Indiana. Coordinates: 15°00′N 86°30′W  /  15.000°N 86.500°W  / 15.000; -86.500 Republic of Honduras República de Honduras    (Spanish) Flag Coat of arms Motto:  "Libre, Soberana e Independiente"   (Spanish) "Free, Sovereign and Independent" Anthem:  "Himno Nacional de Honduras" "National Anthem of Honduras" Capital and largest city Tegucigalpa 14°6′N 87°13′W  /  14.100°N 87.217°W  / 14.100; -87.217 Official languages Spanish Ethnic groups ( [1] ) 90% Mestizo a 7% Amerindian 2% Afro-Honduran 1% White Demonym(s) Honduran Catracho(a) Government Presidential republic • President Juan Orlando Hernández • Vice President Ricardo Álvarez Arias • President of National Congress Mauricio Oliva Legislature National Congress Independence •  Declared b from Spain 15 September 1821 •  Declared from the First Mexican Empire 1 July 1823 • Declared, as Honduras, from the Federal Repu