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

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {describe, discardPeriodicTasks, expect, fakeAsync, it, tick} from '@angular/core/testing';
import {discardPeriodicTasks, fakeAsync, tick} from '@angular/core/testing';
// #docregion basic

View File

@ -1,44 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {expect} from '@angular/core/testing';
var value: any;
var element: any;
var exception: any;
abstract class OtherClass {}
class SomeClass {}
// #docregion toBePromise
expect(value).toBePromise();
// #enddocregion
// #docregion toBeAnInstanceOf
expect(value).toBeAnInstanceOf(SomeClass);
// #enddocregion
// #docregion toHaveText
expect(element).toHaveText('Hello world!');
// #enddocregion
// #docregion toHaveCssClass
expect(element).toHaveCssClass('current');
// #enddocregion
// #docregion toHaveCssStyle
expect(element).toHaveCssStyle({width: '100px', height: 'auto'});
// #enddocregion
// #docregion toContainError
expect(exception).toContainError('Failed to load');
// #enddocregion
// #docregion toImplement
expect(SomeClass).toImplement(OtherClass);
// #enddocregion