aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngMock/angular-mocks.js
diff options
context:
space:
mode:
authorthenickcox2013-11-11 08:30:32 -0800
committerPawel Kozlowski2014-03-02 13:55:51 +0100
commit3248233f5eaa43d6c431abe6598a8a48a76bf1ff (patch)
treeed0fff369d79dfdf213c56978dc06fd6d3568a70 /src/ngMock/angular-mocks.js
parent3a8bbb721dc72b016c4fc4e58b25ea15a4512955 (diff)
downloadangular.js-3248233f5eaa43d6c431abe6598a8a48a76bf1ff.tar.bz2
docs(ngMock): fixes in flush() documentation
The docs for the `flush()` method contained a few grammatical errors and were awkwardly worded. Change the explanation of the method to remove errors and read more naturally. Closes #4886
Diffstat (limited to 'src/ngMock/angular-mocks.js')
-rw-r--r--src/ngMock/angular-mocks.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index c9f31431..413e0aae 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -960,13 +960,12 @@ angular.mock.dump = function(object) {
*
* # Flushing HTTP requests
*
- * The $httpBackend used in production always responds to requests with responses asynchronously.
- * If we preserved this behavior in unit testing we'd have to create async unit tests, which are
- * hard to write, understand, and maintain. However, the testing mock can't respond
- * synchronously because that would change the execution of the code under test. For this reason the
- * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
- * requests and thus preserve the async api of the backend while allowing the test to execute
- * synchronously.
+ * The $httpBackend used in production always responds to requests asynchronously. If we preserved
+ * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
+ * to follow and to maintain. But neither can the testing mock respond synchronously; that would
+ * change the execution of the code under test. For this reason, the mock $httpBackend has a
+ * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
+ * the async api of the backend, while allowing the test to execute synchronously.
*
*
* # Unit testing with mock $httpBackend