单元测试的时候不知道怎么写有相关api文档介绍吗,或者学习教程
大家讲道理2017-05-15 16:58:11
The most commonly used one in this module is $httpBackend
. The documentation is actually quite complete, but you might feel a little dizzy the first time you read it. Just write a demo and try it a few times.
https://docs.angularjs.org/api/ngMock/service/$httpBackend
Other services under this module are similar and are no more complicated to use than the one above. Specific questions can be found in this directory: https://docs.angularjs.org/api/ngMock
If you want to find a tutorial, just look it up first, and then Google the corresponding name.