release: WRNexusJS 0.2.46
This commit is contained in:
@@ -98,10 +98,18 @@ test("stateful component: state text baked into a reactive data-text span, prop
|
||||
);
|
||||
const render = mod.render as (p: Record<string, string>) => string;
|
||||
const out = render({ start: "10", label: "Score" });
|
||||
expect(out).toContain("data-scope=\"start: 10, label: 'Score', count: 10\"");
|
||||
expect(out).toContain('data-scope="start: 10, label: "Score", count: 10"');
|
||||
expect(out).toContain('data-on-click="count++"');
|
||||
// label baked as static text; count baked as its initial value AND kept live.
|
||||
expect(out).toContain('Score: <span data-text="count">10</span>');
|
||||
|
||||
expect(out).toContain('data-scope="');
|
||||
|
||||
expect(out).toContain("start: 10");
|
||||
|
||||
expect(out).toContain("label: "Score"");
|
||||
|
||||
expect(out).toContain("count: 10");
|
||||
});
|
||||
|
||||
test("prop type coercion follows the default value's type", async () => {
|
||||
|
||||
Reference in New Issue
Block a user