javascript - Jest run async function ONCE before all tests -


i want use jest server unit testing (instead of mocah+chai). there way can run async function before tests start (init purposes) once , not every test file? , if there's way of running after tests done?

if execute jest tests npm can run node command or executable before executing other command

"scripts": {     "test": "node setup.js && jest"   } 

so can run command

$ npm t 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -