Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ef3df93

Browse files
mcknellcaitp
authored andcommitted
docs(guide/Unit Testing): tighter English
Leaner, more forceful style. Fixes a grammatical problems with subject number doesn't agrees with the verb. (originally "We have built many features into Angular which makes...", which reduces to "features...which makes"). More authoritative use of commas, such as the Oxford comma in lists of three or more. Sentences that are sentences, not fragments. (Yes, that was a fragment just now. I'm not writing docs now that reflect the polish of the project.) The English grammatical/stylistic notion of parallelism. Etc. This is just polish. The ideas are fine. Closes #10478
1 parent 106f90a commit ef3df93

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/content/guide/unit-testing.ngdoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
JavaScript is a dynamically typed language which comes with great power of expression, but it also
77
comes with almost no help from the compiler. For this reason we feel very strongly that any code
88
written in JavaScript needs to come with a strong set of tests. We have built many features into
9-
Angular which makes testing your Angular applications easy. So there is no excuse for not testing.
9+
Angular which make testing your Angular applications easy. With Angular, there is no excuse for not testing.
1010

1111
## Separation of Concerns
1212

@@ -20,13 +20,13 @@ related pieces such as the DOM elements, or making any XHR calls to fetch the da
2020

2121
While this may seem obvious it can be very difficult to call an individual function on a
2222
typical project. The reason is that the developers often mix concerns resulting in a
23-
piece of code which does everything. It makes an XHR request, it sorts the response data and then it
23+
piece of code which does everything. It makes an XHR request, it sorts the response data, and then it
2424
manipulates the DOM.
2525

26-
With Angular we try to make it easy for you to do the right thing, and so we
27-
provide dependency injection for your XHR requests, which can be mocked, and we provide abstractions which
28-
allow you to test your model without having to resort to manipulating the DOM. The test can then
29-
assert that the data has been sorted without having to create or look at the state of the DOM or
26+
With Angular, we try to make it easy for you to do the right thing. For your XHR requests, we
27+
provide dependency injection, so your requests can be simulated. For the DOM, we abstract it, so you can
28+
test your model without having to manipulate the DOM directly. Your tests can then
29+
assert that the data has been sorted without having to create or look at the state of the DOM or to
3030
wait for any XHR requests to return data. The individual sort function can be tested in isolation.
3131

3232
## With great power comes great responsibility

0 commit comments

Comments
 (0)