fix(change_detection): throw ChangeDetectionError in JIT mode
This commit is contained in:
@ -309,5 +309,6 @@ var _availableDefinitions = [
|
||||
'sayHi("Jim")',
|
||||
'a()(99)',
|
||||
'a.sayHi("Jim")',
|
||||
'passThrough([12])'
|
||||
'passThrough([12])',
|
||||
'invalidFn(1)'
|
||||
];
|
||||
|
@ -542,16 +542,15 @@ export function main() {
|
||||
});
|
||||
});
|
||||
|
||||
// TODO vsavkin: implement it
|
||||
describe('error handling', () => {
|
||||
xit('should wrap exceptions into ChangeDetectionError', () => {
|
||||
var val = _createChangeDetector('invalidProp');
|
||||
it('should wrap exceptions into ChangeDetectionError', () => {
|
||||
var val = _createChangeDetector('invalidFn(1)');
|
||||
try {
|
||||
val.changeDetector.detectChanges();
|
||||
throw new BaseException('fail');
|
||||
} catch (e) {
|
||||
expect(e).toBeAnInstanceOf(ChangeDetectionError);
|
||||
expect(e.location).toEqual('invalidProp in someComponent');
|
||||
expect(e.location).toEqual('invalidFn(1) in location');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user