@@ -989,18 +989,18 @@ angular.mock.dump = function(object) {
989
989
*
990
990
* # Flushing HTTP requests
991
991
*
992
- * The $httpBackend used in production, always responds to requests with responses asynchronously.
993
- * If we preserved this behavior in unit testing, we'd have to create async unit tests, which are
994
- * hard to write, follow and maintain. At the same time the testing mock, can't respond
992
+ * The $httpBackend used in production always responds to requests with responses asynchronously.
993
+ * If we preserved this behavior in unit testing we'd have to create async unit tests, which are
994
+ * hard to write, understand, and maintain. However, the testing mock can't respond
995
995
* synchronously because that would change the execution of the code under test. For this reason the
996
996
* mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
997
- * requests and thus preserving the async api of the backend, while allowing the test to execute
997
+ * requests and thus preserve the async api of the backend while allowing the test to execute
998
998
* synchronously.
999
999
*
1000
1000
*
1001
1001
* # Unit testing with mock $httpBackend
1002
- * The following code shows how to setup and use the mock backend in unit testing a controller.
1003
- * First we create the controller under test
1002
+ * The following code shows how to setup and use the mock backend when unit testing a controller.
1003
+ * First we create the controller under test:
1004
1004
*
1005
1005
<pre>
1006
1006
// The controller code
@@ -1025,7 +1025,7 @@ angular.mock.dump = function(object) {
1025
1025
}
1026
1026
</pre>
1027
1027
*
1028
- * Now we setup the mock backend and create the test specs.
1028
+ * Now we setup the mock backend and create the test specs:
1029
1029
*
1030
1030
<pre>
1031
1031
// testing controller
0 commit comments