Skip to content

Commit 773984d

Browse files
alexeagleclydin
authored andcommitted
build: fixes needed in google3
We have an older version of Jasmine that doesn't support generics in this spot
1 parent eec5262 commit 773984d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/angular_devkit/schematics/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ts_library(
7070
"//packages/angular_devkit/core:node",
7171
"@rxjs",
7272
"@rxjs//operators",
73+
# @typings: node
7374
],
7475
)
7576

packages/angular_devkit/schematics/src/tree/action_spec.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { normalize } from '@angular-devkit/core';
99
import { Action, ActionList } from './action';
1010

11+
type ExpectedAction = jasmine.ObjectContaining<Action>;
1112

1213
describe('Action', () => {
1314
describe('optimize', () => {
@@ -87,7 +88,7 @@ describe('Action', () => {
8788
actions.optimize();
8889
expect(actions.length).toBe(1);
8990
expect(actions.get(0)).toEqual(
90-
jasmine.objectContaining<Action>({ kind: 'c', path: normalize('/test2') }),
91+
jasmine.objectContaining({ kind: 'c', path: normalize('/test2') }) as ExpectedAction,
9192
);
9293
});
9394

@@ -100,14 +101,12 @@ describe('Action', () => {
100101

101102
actions.optimize();
102103
expect(actions.length).toBe(2);
103-
expect(actions.get(0)).toEqual(
104-
jasmine.objectContaining<Action>({
105-
kind: 'r', path: normalize('/test'), to: normalize('/test2'),
106-
}),
107-
);
108-
expect(actions.get(1)).toEqual(
109-
jasmine.objectContaining<Action>({ kind: 'o', path: normalize('/test2') }),
110-
);
104+
expect(actions.get(0)).toEqual(jasmine.objectContaining({
105+
kind: 'r', path: normalize('/test'), to: normalize('/test2'),
106+
}) as ExpectedAction);
107+
expect(actions.get(1)).toEqual(jasmine.objectContaining({
108+
kind: 'o', path: normalize('/test2'),
109+
}) as ExpectedAction);
111110
});
112111
});
113112
});

0 commit comments

Comments
 (0)