Skip to content

Commit 63389e5

Browse files
alexeaglehansl
authored andcommitted
build: fixes needed in google3
1 parent 436c5b3 commit 63389e5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

packages/angular_devkit/schematics/src/rules/call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function callRule(
8080
return input.pipe(mergeMap(inputTree => {
8181
const result = rule(inputTree, context);
8282

83-
if (result === undefined) {
83+
if (!result) {
8484
return observableOf(inputTree);
8585
} else if (typeof result == 'function') {
8686
// This is considered a Rule, chain the rule and return its output.

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import { normalize } from '@angular-devkit/core';
99
import { Action, ActionList } from './action';
1010

11-
type ExpectedAction = jasmine.ObjectContaining<Action>;
12-
1311
describe('Action', () => {
1412
describe('optimize', () => {
1513
it('works with create', () => {
@@ -88,7 +86,7 @@ describe('Action', () => {
8886
actions.optimize();
8987
expect(actions.length).toBe(1);
9088
expect(actions.get(0)).toEqual(
91-
jasmine.objectContaining({ kind: 'c', path: normalize('/test2') }) as ExpectedAction,
89+
jasmine.objectContaining<Action>({ kind: 'c', path: normalize('/test2') }),
9290
);
9391
});
9492

@@ -101,12 +99,12 @@ describe('Action', () => {
10199

102100
actions.optimize();
103101
expect(actions.length).toBe(2);
104-
expect(actions.get(0)).toEqual(jasmine.objectContaining({
102+
expect(actions.get(0)).toEqual(jasmine.objectContaining<Action>({
105103
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);
104+
}));
105+
expect(actions.get(1)).toEqual(
106+
jasmine.objectContaining<Action>({kind: 'o', path: normalize('/test2') }),
107+
);
110108
});
111109
});
112110
});

0 commit comments

Comments
 (0)