refactor(compiler): add details while throw error during expression convert (#32760)

Fixes #32759

PR Close #32760
This commit is contained in:
mohax
2019-09-19 00:44:21 +03:00
committed by Alex Rickabaugh
parent b7c012f91b
commit 6d06d9d3c6
2 changed files with 7 additions and 4 deletions

View File

@ -662,9 +662,9 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
}));
it('should throw when trying to assign to a local', fakeAsync(() => {
expect(() => {
_bindSimpleProp('(event)="$event=1"');
}).toThrowError(new RegExp('Cannot assign to a reference or variable!'));
expect(() => { _bindSimpleProp('(event)="$event=1"'); })
.toThrowError(new RegExp(
'Cannot assign value (.*) to template variable (.*). Template variables are read-only.'));
}));
it('should support short-circuiting', fakeAsync(() => {