feat(change_detector): add support for formatters

This commit is contained in:
vsavkin
2014-11-11 16:30:54 -08:00
parent 79a9430f2c
commit dcd905ae85
4 changed files with 37 additions and 11 deletions

View File

@ -100,7 +100,7 @@ export function main() {
beforeEach(() => {
var template = DOM.createTemplate(tempalteWithThreeTypesOfBindings);
var pv = new ProtoView(template, templateElementBinders(),
new ProtoWatchGroup(), false);
new ProtoWatchGroup(null), false);
view = pv.instantiate(null, null);
});
@ -142,7 +142,12 @@ export function main() {
describe('react to watch group changes', () => {
var view, cd, ctx;
function createView(protoView) {
var protoWatchGroup = new ProtoWatchGroup();
protoWatchGroup.watch(oneFieldAst('foo'), memento);
var pv = new ProtoView(template, templateElementBinders(),
protoWatchGroup, false);
ctx = new MyEvaluationContext();
view = protoView.instantiate(ctx, null);
cd = new ChangeDetector(view.watchGroup);