You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to use Vitest getByText with solid, I found it was necessary to wrap <For each /> with a <div> element. This isn't necessary in the jest or uvu examples.
test("For does not need a parent wrapper",()=>{const{ getByText }=render(()=><Foreach={['a','b','c']}>{(i)=><span>{i}</span>}</For>);expect(getByText('b')).toBeInTheDocument();});
This works right out of the box. Let me test this in the template again. I'm pretty sure it is not related to our testing-library, though, if it works with jest, but not with vitest. There might be an issue with module loading in vitest.
In order to use Vitest getByText with solid, I found it was necessary to wrap
<For each />
with a<div>
element. This isn't necessary in the jest or uvu examples.https://github.com/solidjs/templates/pull/140/files#diff-bd38a4b23a37c0b01fcb17b274fa2578fccce12a7ec824627c84003858ef819d
The text was updated successfully, but these errors were encountered: