Skip to content

Commit

Permalink
fix(@schematics/angular): e2e test fails strict TS config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cexbrayat authored and alexeagle committed Feb 9, 2019
1 parent f51263a commit ffc9423
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -18,6 +18,6 @@ describe('workspace-project App', () => {
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
}));
} as logging.Entry));
});
});

0 comments on commit ffc9423

Please sign in to comment.