solidjs/templates

ts-vitest: vitest watch mode broken

meldron opened this issue · 3 comments

Hi there,

after creating a project with solidjs/templates/ts-vitest and running pnpm run test everything seems to work for the first test run and vitest continues in its watch mode.

When I now change a test file (for example the test name) and vitest reruns the test, it will always fail.

After some debugging with the screen function from solid-testing-library I noticed that the rendered screen changes from

<body>
  <div>
    <div>
      <input
        placeholder="new todo here"
      />
      <button>
        Add Todo
      </button>
    </div>
  </div>
</body>

to

<body>
  <div>
    [object HTMLDivElement]
  </div>
</body>

and now all tests fail.

See also https://gist.github.com/meldron/7425a893def6c3d54119c66c57d1e60e for more example test output.

I updated all the libraries, can you tell me if you still reproduce the issue? :)

Hey @amoutonbrady,

thanks for the update. I did a quick test and it seems like test reruns now work. Do you know what the problem was?

I'm having trouble aswell with the current version. Updating doesn't help.

I'm having exactly the same bug, it shows an [object HTMLDivElement].