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:

committed by
Miško Hevery

parent
1e74ea9e60
commit
00c110b055
@ -112,7 +112,7 @@ describe('elementProperty', () => {
|
||||
|
||||
class OtherDir {
|
||||
// TODO(issue/24571): remove '!'.
|
||||
id !: boolean;
|
||||
id !: number;
|
||||
clickStream = new EventEmitter();
|
||||
|
||||
static ngDirectiveDef = defineDirective({
|
||||
@ -138,7 +138,7 @@ describe('elementProperty', () => {
|
||||
|
||||
class IdDir {
|
||||
// TODO(issue/24571): remove '!'.
|
||||
idNumber !: number;
|
||||
idNumber !: string;
|
||||
|
||||
static ngDirectiveDef = defineDirective({
|
||||
type: IdDir,
|
||||
@ -347,15 +347,14 @@ describe('elementProperty', () => {
|
||||
}
|
||||
}
|
||||
|
||||
expect(renderToHtml(Template, {condition: true, id1: 'one', id2: 'two', id3: 'three'}, deps))
|
||||
expect(renderToHtml(Template, {condition: true, id1: 'one', id2: 'two', id3: 3}, deps))
|
||||
.toEqual(`<button iddir="">Click me</button><button id="two">Click me too</button>`);
|
||||
expect(idDir !.idNumber).toEqual('one');
|
||||
|
||||
expect(
|
||||
renderToHtml(Template, {condition: false, id1: 'four', id2: 'two', id3: 'three'}, deps))
|
||||
expect(renderToHtml(Template, {condition: false, id1: 'four', id2: 'two', id3: 3}, deps))
|
||||
.toEqual(`<button iddir="">Click me</button><button otherdir="">Click me too</button>`);
|
||||
expect(idDir !.idNumber).toEqual('four');
|
||||
expect(otherDir !.id).toEqual('three');
|
||||
expect(otherDir !.id).toEqual(3);
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user