From 196ce6d475959bf8cdaf0ac0ce448ab6557c865a Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 2 Nov 2017 21:31:31 +0200 Subject: [PATCH] build(aio): use correct types for e2e tests --- aio/e2e/api.e2e-spec.ts | 9 ++++----- aio/e2e/tsconfig.e2e.json | 4 +++- aio/package.json | 1 + aio/yarn.lock | 10 ++++++++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/aio/e2e/api.e2e-spec.ts b/aio/e2e/api.e2e-spec.ts index e31e7c8225..589f857edc 100644 --- a/aio/e2e/api.e2e-spec.ts +++ b/aio/e2e/api.e2e-spec.ts @@ -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', () => { diff --git a/aio/e2e/tsconfig.e2e.json b/aio/e2e/tsconfig.e2e.json index ac7a373257..1d9e5edf09 100644 --- a/aio/e2e/tsconfig.e2e.json +++ b/aio/e2e/tsconfig.e2e.json @@ -2,10 +2,12 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/e2e", + "baseUrl": "./", "module": "commonjs", "target": "es5", - "types":[ + "types": [ "jasmine", + "jasminewd2", "node" ] } diff --git a/aio/package.json b/aio/package.json index de2ae7bee2..c0011aa11c 100644 --- a/aio/package.json +++ b/aio/package.json @@ -90,6 +90,7 @@ "@angular/cli": "^1.5.0-rc.8", "@angular/compiler-cli": "^5.0.0-rc.9", "@types/jasmine": "^2.5.52", + "@types/jasminewd2": "^2.0.3", "@types/node": "~6.0.60", "archiver": "^1.3.0", "canonical-path": "^0.0.2", diff --git a/aio/yarn.lock b/aio/yarn.lock index 23d84dc2aa..87b3660ba0 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -276,10 +276,20 @@ version "0.9.43" resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.43.tgz#65d646c5e8c0cd1bdee37065799f9d3d48748253" +"@types/jasmine@*": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.2.tgz#6e6d4cb183cd55c7a1ad6270bced10fdd5367a3c" + "@types/jasmine@^2.5.52": version "2.6.0" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.0.tgz#997b41a27752b4850af2683bc4a8d8222c25bd02" +"@types/jasminewd2@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.3.tgz#0d2886b0cbdae4c0eeba55e30792f584bf040a95" + dependencies: + "@types/jasmine" "*" + "@types/mkdirp@^0.3.29": version "0.3.29" resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.3.29.tgz#7f2ad7ec55f914482fc9b1ec4bb1ae6028d46066"