Alex Lohr

Results 185 comments of Alex Lohr

You don't need to cleanup afterwards, this is already done automatically. However, unless you choose isolation: true in the testing config, tests might influence each other.

I don't want to encourage using isolation of tests at all costs, just explain the mechanism. Your issue might be timing- or error-related (tests could be cleaned up slightly delayed...

Please use screen.get... accessible queries instead of CSS selectors.

It is really hard to keep up with the constant changes, so I'm sorry, but I have no fast solution.

Actually, the router is already supplied by the test, so wrapping it in another router could break it.

That is strange, because this is very close to what we do in our tests: https://github.com/solidjs/solid-testing-library/blob/main/src/__tests__/routes.tsx#L18

Thanks for the repro. I'll test it later.

Sorry, I updated our testing library and everything worked as expected. Maybe the references to older versions broke something, so I'll release the updated version right away.

OK, I just published 0.8.9 and tested a bit more. Encapsulated routers do not yet work. I'm not sure if I will be able to support them, because we need...

Basically, testing your app.tsx. I still want to enable this, but the current approach does not work. Mocking the router is also not an option, because then I would either...