import { render } from "solid-js/web" import { createStore } from "solid-js/store" import { BasicTool } from "../src/components/basic-tool" export { getCachedMarkdown } from "../src/components/markdown-cache" export function mountBasicTool() { const host = document.createElement("div") host.dataset.testid = "basic-tool-fixture" document.body.appendChild(host) render(() => { const [state, setState] = createStore({ label: "Initial title", titles: 0, details: 0 }) function Title() { // Count construction, including JSX created by unused trigger getter reads. setState("titles", (value) => value + 1) return {state.label} } function Details() { setState("details", (value) => value + 1) return
Tool details
} return ( <> setState("label", event.currentTarget.value)} />Function details