mzgoddard / preact-render-spy

Render preact components with access to the produced virtual dom for testing.

Home Page:https://www.npmjs.com/package/preact-render-spy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maping function for FindWrapper

Deseteral opened this issue · comments

It would be nice to have a map function for FindWrapper.

This will allow to write tests like this:

expect(wrapper.find('MyComponent').map(n => n.text())).toEqual([
  'one',
  'two',
  'three',
]);