Description
Running snapshot tests with react-native receive the following error description:
"TypeError: storybook.raw is not a function"
Looking at the storybook/react-native package it doesn't export a "raw" function
https://github.com/storybooks/storybook/blob/next/app/react-native/src/index.js
storybook/react does export a "raw" function
https://github.com/storybooks/storybook/blob/next/app/react/src/client/index.js
The loader process returns a storybook/preview instance that expects the raw function:
https://github.com/storybooks/storybook/blob/next/addons/storyshots/storyshots-core/src/api/index.js#L46
It appears the preview code in storybook/react-native is the area this should be addressed but I haven't had a chance to clone and do some testing. If anyone has any ideas or can point me to the right area I can put together a PR to address this.
Thanks
Is there a workaround?
Not that I've found. We've disabled all RN storyshots for now. I attempted to run the CRA native example app as a debugging avenue but couldn't get it running (unrelated to this issue). I'm not sure the example app has been updated recently. Unfortunately I had to move on for the time being.
This was fixed in https://github.com/storybooks/storybook/pull/6182 and released in 5.1.0-alpha.10
Most helpful comment
This was fixed in https://github.com/storybooks/storybook/pull/6182 and released in
5.1.0-alpha.10