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

Commit f04142e

Browse files
mkotsurIgorMinar
authored andcommitted
docs(guide/unit-testing): fixed typo in code example
1 parent aaedefb commit f04142e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: docs/content/guide/dev_guide.unit-testing.ngdoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ State & Singletons}
9292

9393
The class above is hard to test since we have to change global state:
9494
<pre>
95-
var oldXHR = glabal.xhr;
96-
glabal.xhr = function mockXHR() {};
95+
var oldXHR = global.xhr;
96+
global.xhr = function mockXHR() {};
9797
var myClass = new MyClass();
9898
myClass.doWork();
9999
// assert that mockXHR got called with the right arguments
@@ -126,12 +126,12 @@ there is only one global variable to be reset).
126126

127127
The class above is hard to test since we have to change global state:
128128
<pre>
129-
var oldServiceLocator = glabal.serviceLocator;
130-
glabal.serviceLocator.set('xhr', function mockXHR() {});
129+
var oldServiceLocator = global.serviceLocator;
130+
global.serviceLocator.set('xhr', function mockXHR() {});
131131
var myClass = new MyClass();
132132
myClass.doWork();
133133
// assert that mockXHR got called with the right arguments
134-
glabal.serviceLocator = oldServiceLocator; // if you forget this bad things will happen
134+
global.serviceLocator = oldServiceLocator; // if you forget this bad things will happen
135135
</pre>
136136

137137

0 commit comments

Comments
 (0)