build: update jasmine to 3.5 (#34625)

1. update jasmine to 3.5
2. update @types/jasmine to 3.5
3. update @types/jasminewd2 to 2.0.8

Also fix several cases, the new jasmine 3 will help to create test cases correctly,
such as in the `jasmine 2.x` version, the following case will pass

```
expect(1 == 2);
```

But in jsamine 3, the case will need to be

```
expect(1 == 2).toBeTrue();
```

PR Close #34625
This commit is contained in:
JiaLiPassion
2020-01-03 14:28:06 +09:00
committed by Kara Erickson
parent 52ab9397a0
commit b28a5f6eef
29 changed files with 124 additions and 85 deletions

View File

@ -95,7 +95,7 @@ runInEachFileSystem(() => {
});
// The "test" compilation result is just the name of the decorator being compiled
// (suffixed with `(compiled)`)
handler.compile.and.callFake((decl: ts.Declaration, analysis: any) => {
(handler.compile as any).and.callFake((decl: ts.Declaration, analysis: any) => {
logs.push(`compile: ${(decl as any).name.text}@${analysis.decoratorName} (resolved: ${
analysis.resolved})`);
return `@${analysis.decoratorName} (compiled)`;
@ -183,7 +183,7 @@ runInEachFileSystem(() => {
it('should call detect on the decorator handlers with each class from the parsed file',
() => {
expect(testHandler.detect).toHaveBeenCalledTimes(5);
expect(testHandler.detect.calls.allArgs().map(args => args[1])).toEqual([
expect(testHandler.detect.calls.allArgs().map((args: any[]) => args[1])).toEqual([
null,
jasmine.arrayContaining([jasmine.objectContaining({name: 'Component'})]),
jasmine.arrayContaining([jasmine.objectContaining({name: 'Directive'})]),