title: TypeError: Component is not a constructor when testing Svelte Component
body: <p>I want to use <a href="https://github.com/testing-library/svelte-testing-library" rel="nofollow noreferrer">svelte-testing-library</a> and <a href="https://github.com/kenoxa/svelte-htm" rel="nofollow noreferrer">svelte-htm</a> to test the two way binding of a property passed to a custom Svelte component. When trying to render the component during the test, this exception is thrown:</p>
  <pre><code>TypeError: Component is not a constructor
  
     9 | it(&quot;should generate first page&quot;, async () =&gt; {
    10 |   let pageRows = writable([]);
  &gt; 11 |   const { getByRole } = render(
       |                         ^
    12 |     html`&lt;${Pagination} rows=${[1, 2, 3]} bind:pageRows=${pageRows} /&gt;`
    13 |   );
    14 |   const button = getByRole(&quot;div&quot;);
  
    at create_fragment (node_modules/svelte-hyperscript/src/h.js:132:21)
    at Object.init (node_modules/svelte/internal/index.js:1454:37)
    at new Component (node_modules/svelte-hyperscript/src/h.js:78:7)
    at render (node_modules/@testing-library/svelte/dist/pure.js:71:21)
    at Object.&lt;anonymous&gt; (Pagination.test.js:11:25)
  </code></pre>
  <p>I made a codesandbox to reproduce the issue. I wasn't able to run the test in codesandbox at all but you can download the code as zip and then do <code>npm install &amp;&amp; npm run test</code>.</p>
  <p><a href="https://codesandbox.io/s/nostalgic-snyder-1k8g0?file=/Pagination.test.js" rel="nofollow noreferrer">https://codesandbox.io/s/nostalgic-snyder-1k8g0?file=/Pagination.test.js</a></p>