Skip to content

Commit 69e4d40

Browse files
shairezbtford
authored andcommitted
doc(guide): Fixed typos at the unit tests guide
1 parent d521619 commit 69e4d40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/guide/dev_guide.unit-testing.ngdoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ There are several ways in which you can get a hold of a dependency:
4242
1. You could create it using the `new` operator.
4343
2. You could look for it in a well known place, also known as global singleton.
4444
3. You could ask a registry (also known as service registry) for it. (But how do you get a hold of
45-
the registry? Must likely by looking it up in a well known place. See #2)
45+
the registry? Most likely by looking it up in a well known place. See #2)
4646
4. You could expect that it be handed to you.
4747

48-
Out of the list above only the last option is testable. Let's look at why:
48+
Out of the four options in the list above, only the last one is testable. Let's look at why:
4949

5050
### Using the `new` operator
5151

@@ -131,7 +131,7 @@ function MyClass() {
131131
}
132132
</pre>
133133

134-
However, where dose the serviceRegistry come from? if it is:
134+
However, where does the serviceRegistry come from? if it is:
135135
* `new`-ed up, the the test has no chance to reset the services for testing
136136
* global look-up, then the service returned is global as well (but resetting is easier, since
137137
there is only one global variable to be reset).
@@ -251,7 +251,7 @@ and the test is straight forward
251251
var pc = new PasswordCtrl();
252252
pc.password('abc');
253253
pc.grade();
254-
expect(span.strength).toEqual('weak');
254+
expect(pc.strength).toEqual('weak');
255255
</pre>
256256

257257
Notice that the test is not only much shorter but it is easier to follow what is going on. We say

0 commit comments

Comments
 (0)