chore(testing): Refactor test methods to have a uniform interface.
Remove FunctionWithParamTokens. All test wrappers async, fakeAsync and inject now return just a Function instead of FunctionWithParamTokens. This makes them directly consumable by the test framework. Also the test framework code does not have to handle a union of Function and FunctionWithParamTokens everywhere. The Function returned by the above methods are considered asynchronous by the test framework if they return a Promise, synchronous otherwise. Closes #8257
This commit is contained in:

committed by
vikerman

parent
d2efac18ed
commit
35cd0ded22
@ -79,8 +79,7 @@ dynamic _runInjectableFunction(Function fn) {
|
||||
tokens.add(token);
|
||||
}
|
||||
|
||||
var injectFn = new FunctionWithParamTokens(tokens, fn, false);
|
||||
return _testInjector.execute(injectFn);
|
||||
return _testInjector.execute(tokens, fn);
|
||||
}
|
||||
|
||||
/// Use the test injector to get bindings and run a function.
|
||||
|
Reference in New Issue
Block a user