Closed pauleveritt closed 2 weeks ago
Can you provide a repo so I can check with Vitest? Seems strange...
Here's a repo with some instructions in README: https://github.com/pauleveritt/vitest-jsx-async-runtime
Repo seems to be private...;-)
@jablonski Crap, that's the second time I've done this. I make the repo from WebStorm and forget it defaults to private. Fixed, sorry.
Hi Paul,
thanks for reporting.
Vitest injects an empty object ({}) as JsxElement, which wasn't handled properly by jsx-async-runtime. This is fixed in 0.4.1.
IMHO injecting an empty object as JsxElement looks like a Vitest bug too me. At least I cannot think of any good reason for this behaviour, but it is good to have it covered in jsx-async-runtime anyway.
I'm happy to say, I plugged it in, all my tests are passing.
Let me know if you need a repo. I'm trying out 0.4. This code works fine in
foo.tsx
when run fromtsx
:When I put this in a Vitest test:
I get:
It fails on this line...but the second time through. The first time,
t.tag
isfunction Content()
. I continue and at the breakpoint the second time, there is not.tag
. Screenshot attached of what it is stopped on.