-
Does this library support browser mode? When attempted it, I got errors related to certain CJS formatted modules not being converted to ESM (was able to work around this) as well it trying to use certain node libraries that are not available in the browser (maybe could polyfill it for testing?). I can open an issue with the details of my problem if it's supposed to work or if it's within scope to add that support. OTOH, if that sort of configuration is out of the scope for this library I can look towards other libraries. It seems odd that a framework which is designed to work in a browser (Svelte) would have a test library that can't run in that same runtime. I get the fake DOM libraries like jsdom and happydom have decent parity. But it's still a far cry from the real thing. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Lol, nevermind. My previous attempts to work around it involved whitelisting the CJS modules it was having trouble importing with the optimizeDeps: {
include: [
'@testing-library/svelte'
],
}, |
Beta Was this translation helpful? Give feedback.
-
@eric1234 I have not yet played around with browser mode while it's in its experimental phase, but I'm definitely curious to hear about your experience with it! This library doesn't do anything specific to JSDOM / happy-dom, it simply (via Do things work at all without |
Beta Was this translation helpful? Give feedback.
Lol, nevermind. My previous attempts to work around it involved whitelisting the CJS modules it was having trouble importing with the
optimizeDeps
. When I instead just did optimizeDeps for the entire@testing-library/svelte
it seemed to work out of the box: