What would be the best approach to unit testing this type of Javascript function.
index.js function a() { function1(); function2(); }
I want to check that function1 and function2 were called after calling function a()