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

Commit 2022fd7

Browse files
thomastutspetebacondarwin
authored andcommitted
docs(guide/unit-testing): remove unwanted whitespaces
Closes #5395
1 parent e37e67e commit 2022fd7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/guide/unit-testing.ngdoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function MyClass() {
6565

6666
A problem surfaces in tests when we would like to instantiate a `MockXHR` that would
6767
allow us to return fake data and simulate network failures. By calling `new XHR()` we are
68-
permanently bound to the actual XHR and there is no way to replace it. Yes, we could monkey
68+
permanently bound to the actual XHR and there is no way to replace it. Yes, we could monkey
6969
patch, but that is a bad idea for many reasons which are outside the scope of this document.
7070

7171
Here's an example of how the class above becomes hard to test when resorting to monkey patching:
@@ -96,7 +96,7 @@ function MyClass() {
9696
```
9797

9898
While no new dependency instance is created, it is fundamentally the same as `new` in
99-
that no way exists to intercept the call to `global.xhr` for testing purposes, other than
99+
that no way exists to intercept the call to `global.xhr` for testing purposes, other than
100100
through monkey patching. The basic issue for testing is that a global variable needs to be mutated in
101101
order to replace it with call to a mock method. For further explanation of why this is bad see: [Brittle Global
102102
State & Singletons](http://misko.hevery.com/code-reviewers-guide/flaw-brittle-global-state-singletons/)
@@ -133,7 +133,7 @@ function MyClass() {
133133

134134
However, where does the serviceRegistry come from? If it is:
135135
* `new`-ed up, the test has no chance to reset the services for testing.
136-
* a global look-up then the service returned is global as well (but resetting is easier, since
136+
* a global look-up then the service returned is global as well (but resetting is easier, since
137137
only one global variable exists to be reset).
138138

139139
The class above is hard to test since we have to change the global state:
@@ -296,7 +296,7 @@ Now we can add a directive to our app.
296296
app.directive('aGreatEye', function () {
297297
return {
298298
restrict: 'E',
299-
replace: true,
299+
replace: true,
300300
template: '<h1>lidless, wreathed in flame, {{1 + 1}} times</h1>'
301301
};
302302
});

0 commit comments

Comments
 (0)