hunk.code_window: 				"@types/babel__traverse": "^7.0.6"
   			}
   		},
   		"babel-plugin-jsx-dom-expressions": {
   			"version": "0.23.3",
   			"resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.23.3.tgz",
   			"integrity": "sha512-MDC0M0BsTY39hUO3o40jUNuHvy2OMzllU28NU2T6wYoXKs7YeNVF0yy5gzT7n7X3Ibgl8ZiH+5Pqm9Y9+/O8ug==",
   			"dev": true,
   			"requires": {
   				"@babel/helper-module-imports": "^7.10.4",
   				"@babel/plugin-syntax-jsx": "^7.10.4",
   				"@babel/types": "^7.11.5"
  
hunk.labels: keep keep keep keep replace replace replace keep keep keep keep keep
hunk.after_edit: 			"version": "0.23.4",
   			"resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.23.4.tgz",
   			"integrity": "sha512-JPzfvyCXVPNHVk0NZKsFOpA1o1U5sjdutUiXI9CzeL78pOqsuJMc3G2IIQhGwbfjZQgwSIMwxOaoAjMFT5Y9ag==",
  
hunk.file_path: package-lock.json
hunk.type: replace
file: import { createRoot, createSignal, Component } from "../../src";
  import { Dynamic } from "../src";
  
  describe("Testing Dynamic control flow", () => {
    let div: HTMLDivElement, disposer: () => void;
  
    interface DynamicProps {
      title: string;
    }
    const [comp, setComp] = createSignal<Component<DynamicProps> | keyof JSX.IntrinsicElements>(),
      [name, setName] = createSignal("Smith");
    const Component = () => (
        <div ref={div}>
          <Dynamic component={comp()} title={name()} />
        </div>
      ),
      CompA: Component<DynamicProps> = props => <div>Hi {props.title}</div>,
      CompB: Component<DynamicProps> = props => <span>Yo {props.title}</span>;
  
    test("Create Dynamic control flow", () => {
      createRoot(dispose => {
        disposer = dispose;
        <Component />;
      });
  
      expect(div.innerHTML).toBe("");
    });
  
    test("Toggle Dynamic control flow", () => {
      setComp(CompA);
      expect(div.innerHTML).toBe("<div>Hi Smith</div>");
      setName("Smithers");
      expect(div.innerHTML).toBe("<div>Hi Smithers</div>");
      setComp(CompB);
      expect(div.innerHTML).toBe("<span>Yo Smithers</span>");
      setComp("h1");
      expect(div.innerHTML).toBe(`<h1 title="Smithers"></h1>`);
      setName("Sunny")
      expect(div.innerHTML).toBe(`<h1 title="Sunny"></h1>`);
    });
  
    test("dispose", () => disposer());
  });
  