refactor(test_injector): Provide separate methods for creating test injector with and without runtime compiler.
BREAKING CHANGE: `createTestInjector()` does not more include the runtime compiler. Use `createTestInjectorWithRuntimeCompiler()` instead. Closes #5583
This commit is contained in:
@ -6,7 +6,12 @@ import {global} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {bind} from 'angular2/src/core/di';
|
||||
|
||||
import {createTestInjector, FunctionWithParamTokens, inject, injectAsync} from './test_injector';
|
||||
import {
|
||||
createTestInjectorWithRuntimeCompiler,
|
||||
FunctionWithParamTokens,
|
||||
inject,
|
||||
injectAsync
|
||||
} from './test_injector';
|
||||
|
||||
export {inject, injectAsync} from './test_injector';
|
||||
|
||||
@ -150,7 +155,7 @@ function _it(jsmFn: Function, name: string, testFn: FunctionWithParamTokens | An
|
||||
if (testFn instanceof FunctionWithParamTokens) {
|
||||
jsmFn(name, (done) => {
|
||||
if (!injector) {
|
||||
injector = createTestInjector(testProviders);
|
||||
injector = createTestInjectorWithRuntimeCompiler(testProviders);
|
||||
}
|
||||
|
||||
var returnedTestValue = runInTestZone(() => testFn.execute(injector), done, done.fail);
|
||||
@ -179,7 +184,7 @@ export function beforeEach(fn: FunctionWithParamTokens | AnyTestFn): void {
|
||||
|
||||
jsmBeforeEach((done) => {
|
||||
if (!injector) {
|
||||
injector = createTestInjector(testProviders);
|
||||
injector = createTestInjectorWithRuntimeCompiler(testProviders);
|
||||
}
|
||||
|
||||
runInTestZone(() => fn.execute(injector), done, done.fail);
|
||||
|
Reference in New Issue
Block a user