build(aio): use correct types for e2e tests
This commit is contained in:

committed by
Victor Berchet

parent
faa621218e
commit
196ce6d475
@ -3,23 +3,22 @@ import { ApiPage } from './api.po';
|
||||
describe('Api pages', function() {
|
||||
it('should show direct subclasses of a class', () => {
|
||||
const page = new ApiPage('api/forms/AbstractControlDirective');
|
||||
// We must use `as any` (here and below) because of broken typings for jasmine
|
||||
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl'] as any);
|
||||
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl']);
|
||||
});
|
||||
|
||||
it('should show direct and indirect subclasses of a class', () => {
|
||||
const page = new ApiPage('api/forms/AbstractControlDirective');
|
||||
expect(page.getDescendants('class')).toEqual(['ControlContainer', 'AbstractFormGroupDirective', 'NgControl'] as any);
|
||||
expect(page.getDescendants('class')).toEqual(['ControlContainer', 'AbstractFormGroupDirective', 'NgControl']);
|
||||
});
|
||||
|
||||
it('should show child interfaces that extend an interface', () => {
|
||||
const page = new ApiPage('api/forms/Validator');
|
||||
expect(page.getDescendants('interface')).toEqual(['AsyncValidator'] as any);
|
||||
expect(page.getDescendants('interface')).toEqual(['AsyncValidator']);
|
||||
});
|
||||
|
||||
it('should show classes that implement an interface', () => {
|
||||
const page = new ApiPage('api/animations/AnimationPlayer');
|
||||
expect(page.getDescendants('class')).toEqual(['NoopAnimationPlayer', 'MockAnimationPlayer'] as any);
|
||||
expect(page.getDescendants('class')).toEqual(['NoopAnimationPlayer', 'MockAnimationPlayer']);
|
||||
});
|
||||
|
||||
it('should show type params of type-aliases', () => {
|
||||
|
@ -2,10 +2,12 @@
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"baseUrl": "./",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types":[
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user