refactor(tests): rename beforeEachBindings -> beforeEachProviders
Change beforeEachBindings to beforeEachProviders but preserve the @deprecated method beforeEachBindings, in order to keep a working deprecation warning
This commit is contained in:
committed by
Jeremy Elbourn
parent
7f783289ab
commit
070d818e68
@@ -104,16 +104,16 @@ export function beforeEach(fn: FunctionWithParamTokens | SyncTestFn): void {
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* beforeEachBindings(() => [
|
||||
* beforeEachProviders(() => [
|
||||
* provide(Compiler, {useClass: MockCompiler}),
|
||||
* provide(SomeToken, {useValue: myValue}),
|
||||
* ]);
|
||||
*/
|
||||
export function beforeEachProviders(fn): void {
|
||||
jsmBeforeEach(() => {
|
||||
var bindings = fn();
|
||||
if (!bindings) return;
|
||||
testProviders = [...testProviders, ...bindings];
|
||||
var providers = fn();
|
||||
if (!providers) return;
|
||||
testProviders = [...testProviders, ...providers];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user