In this final section, I introduce a term I invented to describe a type of test helper that is useful in writing aspect tests: mock targets.
在最后一节中,我介绍了我自己发明的、用于描述在编写方面测试时用到的一种测试helper类类型的术语:mock目标。
Now that the mock is prepared, I pass it as an argument to the method under test.
现在mock准备好了,我把它作为参数传递给要测试的方法。
In this case, I can use this mock object for only a single test case.
在这个示例中,这个mock对象只能用于测试用例。
I added mini/spec and mini/mock and they can work side-by-side with mini/test.
加入了mini/spec和mini/mock,它们可以和mini/test共同使用
Here is the jsfiddle. For test purpose, I replaced doAjax arguments by a mock factory call, but the code stay the same.
我认为你的代码是做正确的方式,把你的电话在一个新的推迟,直到所有的尝试都达到了回报。
Now to the problem: I want to test the services, with mock data.
现在的问题:我想测试服务,与模拟数据。
When my friends were watching fireworks performance I was taking the IELTS mock test alone.
当大家欣赏焰火表演的时候,自己在空空的教室中做雅思模拟题。
When my friends were watching fireworks performance I was taking the IELTS mock test alone.
当大家欣赏焰火表演的时候,自己在空空的教室中做雅思模拟题。
应用推荐