30 lines
708 B
Plaintext
30 lines
708 B
Plaintext
|
|
.l-main-section
|
|
h2(class="function export") beforeEachBindings
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
beforeEachBindings(fn: any) : void
|
|
|
|
|
|
p.location-badge.
|
|
exported from <a href='../test'>angular2/test</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/test_lib/test_lib.ts#L112-L132">angular2/src/test_lib/test_lib.ts (line 112)</a>
|
|
|
|
:markdown
|
|
Allows overriding default bindings defined in test_injector.js.
|
|
|
|
The given function must return a list of DI bindings.
|
|
|
|
Example:
|
|
|
|
beforeEachBindings(() => [
|
|
bind(Compiler).toClass(MockCompiler),
|
|
bind(SomeToken).toValue(myValue),
|
|
]);
|
|
|
|
|
|
|
|
|