Skip to content

Commit 238e0e6

Browse files
test(web): type the function-children spread fixture as any
HTMLAttributes.children is JSX.Element; insert() resolves a function at runtime, the type does not. test-types was failing on it. Co-authored-by: Cursor <[email protected]>
1 parent ae9d0dc commit 238e0e6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/web/test/spread-nodes.spec.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ describe("children stay a separate effect", () => {
268268

269269
test("plain data children that are a function still resolve reactively", () => {
270270
const [count, setCount] = createSignal(0);
271-
const props = { children: () => `n=${count()}` };
271+
// A function is not a JSX.Element type-wise, but insert() resolves it.
272+
const props = { children: () => `n=${count()}` } as any;
272273
const m = mount(() => <div {...props} />);
273274
expect(m.el().textContent).toBe("n=0");
274275
setCount(1);

0 commit comments

Comments
 (0)