diff options
| author | thenickcox | 2013-11-11 08:30:32 -0800 | 
|---|---|---|
| committer | Pawel Kozlowski | 2014-03-02 13:55:51 +0100 | 
| commit | 3248233f5eaa43d6c431abe6598a8a48a76bf1ff (patch) | |
| tree | ed0fff369d79dfdf213c56978dc06fd6d3568a70 | |
| parent | 3a8bbb721dc72b016c4fc4e58b25ea15a4512955 (diff) | |
| download | angular.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
| -rw-r--r-- | src/ngMock/angular-mocks.js | 13 | 
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 | 
