fix(change_detection): handle locals when invoking a method

Closes #660
This commit is contained in:
vsavkin
2015-02-20 15:50:12 -08:00
parent 7f31036427
commit 0dfd287ec3
3 changed files with 34 additions and 3 deletions

View File

@ -318,6 +318,14 @@ export function main() {
.toEqual(['key=value']);
});
it('should invoke a function from ContextWithVariableBindings', () => {
var locals = new ContextWithVariableBindings(null,
MapWrapper.createFromPairs([["key", () => "value"]]));
expect(executeWatch('key', 'key()', locals))
.toEqual(['key=value']);
});
it('should handle nested ContextWithVariableBindings', () => {
var nested = new ContextWithVariableBindings(null,
MapWrapper.createFromPairs([["key", "value"]]));