`x${value}`)} />
);
});
let store = new Store({ data: { value: 100 } });
async function test(value: Prop
, expectation: any) {
const component = await createTestRenderer(store, );
let tree = component.toJSON();
assert.deepEqual(tree, {
type: "div",
children: [expectation],
props: {},
});
}
await test({ bind: "value" }, "x100");
await test({ expr: "{value}" }, "x100");
await test({ tpl: "{value:n;2}" }, "x100.00");
await test(200, "x200");
await test(() => 500, "x500");
await test(
computable("value", (value: string) => value + 100),
"x200",
);
await test(null, "xnull");
await test(undefined, "xundefined");
await test(0, "x0");
await test(false, "xfalse");
});
});