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:
@ -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
|
||||
|
@ -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
|
Reference in New Issue
Block a user