We also have an instance of that module called myApp in the test. To spy on the myApp.setFlag() function, we use: spyOn(myApp, "setFlag");.
確定! 回上一頁