Skip to content

Commit 2848964

Browse files
cexbrayatalexeagle
authored andcommitted
fix(@schematics/angular): e2e test fails strict TS config
If using `strictFunctionTypes: true` in `tsconfig.json`, the default e2e test is failing compilation with: ``` error TS2345: Argument of type 'ObjectContaining<{ level: Level; }>' is not assignable to parameter of type 'Expected<Entry>'. Type 'ObjectContaining<{ level: Level; }>' is not assignable to type 'ObjectContaining<Entry>'. Type 'Partial<{ level: Level; }>' is not assignable to type 'Partial<Entry>'. Type '{ level: Level; }' is not assignable to type 'Entry'. ``` Explictely using `as logging.Entry` fixes the issue.
1 parent e0e129c commit 2848964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/e2e/files/src/app.e2e-spec.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ describe('workspace-project App', () => {
1818
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
1919
expect(logs).not.toContain(jasmine.objectContaining({
2020
level: logging.Level.SEVERE,
21-
}));
21+
} as logging.Entry));
2222
});
2323
});

0 commit comments

Comments
 (0)