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

Commit 73e1d00

Browse files
docs(tutorial): clarify use of inject() in step 9
Closes #3718
1 parent 33ab261 commit 73e1d00

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/content/tutorial/step_09.ngdoc

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ describe('filter', function() {
9494

9595
beforeEach(module('phonecatFilters'));
9696

97-
9897
describe('checkmark', function() {
9998

10099
it('should convert boolean values to unicode checkmark or cross',
@@ -106,8 +105,12 @@ describe('filter', function() {
106105
});
107106
</pre>
108107

109-
Note that you need to configure our test injector with the `phonecatFilters` module before any of
110-
our filter tests execute.
108+
We must call `beforeEach(module('phonecatFilters'))` before any of
109+
our filter tests execute. This call loads our `phonecatFilters` module into the injector
110+
for this test run.
111+
112+
Note that we call the helper function, `inject(function(checkmarkFilter) { ... })`, to get
113+
access to the filter that we want to test. See {@link api/angular.mock.inject angular.mock.inject()}.
111114

112115
You should now see the following output in the Karma tab:
113116

0 commit comments

Comments
 (0)