
committed by
Victor Berchet

parent
9146bb0816
commit
3aca5ff9e2
@ -78,6 +78,14 @@ export function main() {
|
||||
.toThrowError(`Expected 'styles' to be an array of strings.`);
|
||||
}
|
||||
}));
|
||||
|
||||
it('should throw with descriptive error message when provider token can not be resolved',
|
||||
inject([CompileMetadataResolver], (resolver: CompileMetadataResolver) => {
|
||||
if (!IS_DART) {
|
||||
expect(() => resolver.getDirectiveMetadata(MyBrokenComp1))
|
||||
.toThrowError(`Can't resolve all parameters for MyBrokenComp1: (?).`);
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
describe('getViewDirectivesMetadata', () => {
|
||||
@ -148,3 +156,8 @@ class ComponentWithEverything implements OnChanges,
|
||||
ngAfterViewInit(): void {}
|
||||
ngAfterViewChecked(): void {}
|
||||
}
|
||||
|
||||
@Component({selector: 'my-broken-comp', template: ''})
|
||||
class MyBrokenComp1 {
|
||||
constructor(public dependency: any) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user