build: upgrade jasmine (and related typings) to latest version (#19904)

With these changes, the types are a little stricter now and also not
compatible with Protractor's jasmine-like syntax. So, we have to also
use `@types/jasminewd2` for e2e tests (but not for non-e2e tests).

I also had to "augment" `@types/jasminewd2`, because the latest
typings from [DefinitelyTyped][1] do not reflect the fact that the
`jasminewd2` version (v2.1.0) currently used by Protractor supports
passing a `done` callback to a spec.

[1]: 566e039485/types/jasminewd2/index.d.ts (L9-L15)

Fixes #23952
Closes #24733

PR Close #19904
This commit is contained in:
George Kalpakas
2017-10-24 14:54:08 +03:00
committed by Miško Hevery
parent 1e74ea9e60
commit 00c110b055
59 changed files with 332 additions and 283 deletions

View File

@ -80,14 +80,14 @@ import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
it('supports setting and accessing value \'false\' via get', () => {
const transferState: TransferState = TestBed.get(TransferState);
transferState.set(TEST_KEY, false);
expect(transferState.get(TEST_KEY, 20)).toBe(false);
expect(transferState.get(TEST_KEY, true)).toBe(false);
expect(transferState.hasKey(TEST_KEY)).toBe(true);
});
it('supports setting and accessing value \'null\' via get', () => {
const transferState: TransferState = TestBed.get(TransferState);
transferState.set(TEST_KEY, null);
expect(transferState.get(TEST_KEY, 20)).toBe(null);
expect(transferState.get(TEST_KEY, 20 as any)).toBe(null);
expect(transferState.hasKey(TEST_KEY)).toBe(true);
});
@ -130,4 +130,4 @@ import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
expect(unescapedObj['testString']).toBe(testString);
});
});
})();
})();

View File

@ -809,7 +809,7 @@ class CompWithUrlTemplate {
describe('errors', () => {
let originalJasmineIt: (description: string, func: () => void) => jasmine.Spec;
let originalJasmineBeforeEach: (beforeEachFunction: () => void) => void;
let originalJasmineBeforeEach: (beforeEachFunction: (done: DoneFn) => void) => void;
const patchJasmineIt = () => {
let resolve: (result: any) => void;