30 lines
701 B
Plaintext
30 lines
701 B
Plaintext
|
|
.l-main-section
|
|
h2(class="function export") beforeEachBindings
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
beforeEachBindings(fn: any)
|
|
|
|
|
|
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.32/modules/angular2/src/test_lib/test_lib.ts#L111-L131">angular2/src/test_lib/test_lib.ts (line 111)</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),
|
|
]);
|
|
|
|
|
|
|
|
|