Skip to content

Commit

Permalink
doc(TestInjector): fix a build error with dgeni
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Mar 13, 2015
1 parent 8d2ee6b commit fde7e9e
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions modules/angular2/src/test_lib/test_injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,24 @@ export function createTestInjector(bindings: List) {
return rootInjector.createChild(ListWrapper.concat(_getAppBindings(), bindings));
}

/**
* Allows injecting dependencies in beforeEach() and it().
/*
* Allows injecting dependencies in `beforeEach()` and `it()`.
*
* Example:
*
* beforeEach(inject([Dependency, AClass], (dep, object) => {
* // some code that uses `dep` and `object`
* // ...
* }));
* ```
* beforeEach(inject([Dependency, AClass], (dep, object) => {
* // some code that uses `dep` and `object`
* // ...
* }));
*
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
* object.doSomething().then(() => {
* expect(...);
* async.done();
* });
* })
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
* object.doSomething().then(() => {
* expect(...);
* async.done();
* });
* })
* ```
*
* Notes:
* - injecting an `AsyncTestCompleter` allow completing async tests - this is the equivalent of
Expand Down

0 comments on commit fde7e9e

Please sign in to comment.