fix(compiler): fix a typo in BIND_NAME_REGEXP

This commit is contained in:
Victor Berchet
2014-12-18 11:39:37 +01:00
parent 45008884e4
commit 7027674081
2 changed files with 5 additions and 1 deletions

View File

@ -43,6 +43,10 @@ export function main() {
it('should detect () syntax', () => {
var results = createPipeline().process(createElement('<div (click)="b()"></div>'));
expect(MapWrapper.get(results[0].eventBindings, 'click').source).toEqual('b()');
// "(click[])" is not an expected syntax and is only used to validate the regexp
results = createPipeline().process(createElement('<div (click[])="b()"></div>'));
expect(MapWrapper.get(results[0].eventBindings, 'click[]').source).toEqual('b()');
});
it('should detect on- syntax', () => {