fix(testing): remove deprecated testing APIs (#9923)

See https://github.com/angular/angular/blob/master/CHANGELOG.md for
prior deprecation and how to update.
This commit is contained in:
Julie Ralph
2016-07-11 16:04:32 -07:00
committed by GitHub
parent 94dc632a6d
commit 9af2d8b810
71 changed files with 122 additions and 416 deletions

View File

@ -18,100 +18,11 @@ declare var global: any;
var _global = <any>(typeof window === 'undefined' ? global : window);
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var expect: Function = _global.expect;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var afterEach: Function = _global.afterEach;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var describe: Function = _global.describe;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var fdescribe = _global.fdescribe;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var ddescribe = _global.ddescribe;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var xdescribe: Function = _global.xdescribe;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var beforeEach = _global.beforeEach;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var it = _global.it;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var fit = _global.fit;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var iit = _global.fit;
/**
* @deprecated you no longer need to import jasmine functions from @angular/core/testing. Simply use
* the globals.
*
* See http://jasmine.github.io/ for more details.
*/
export var xit = _global.xit;
var testInjector: TestInjector = getTestInjector();
// Reset the test providers before each test.
if (_global.beforeEach) {
beforeEach(() => { testInjector.reset(); });
_global.beforeEach(() => { testInjector.reset(); });
}
/**
@ -173,10 +84,3 @@ export function configureCompiler(config: {providers?: any[], useJit?: boolean})
'current `it` function.');
}
}
/**
* @deprecated Use beforeEach(() => addProviders())
*/
export function beforeEachProviders(fn: () => Array<any>): void {
beforeEach(() => { addProviders(fn()); });
}

View File

@ -16,8 +16,6 @@ import {getTestInjector, inject} from './test_injector';
export {AsyncTestCompleter} from './async_test_completer';
export {MockAnimationPlayer} from './mock_animation_player';
export {inject} from './test_injector';
export {expect} from './testing';
export * from './logger';
export * from './ng_zone_mock';
export * from './mock_application_ref';
@ -27,6 +25,7 @@ export var proxy: ClassDecorator = (t: any /** TODO #9100 */) => t;
var _global = <any>(typeof window === 'undefined' ? global : window);
export var afterEach: Function = _global.afterEach;
export var expect: Function = _global.expect;
var jsmBeforeEach = _global.beforeEach;
var jsmDescribe = _global.describe;