Code Monkey home page Code Monkey logo

Comments (7)

dannyhw avatar dannyhw commented on June 12, 2024 2

@flochtililoch oh right I see what you mean, I guess thats a problem with being on 6.5 for compatibility with react native storybook. On v7 react native web works well with the test-runner but I haven't recently tried configuring things with 6.5, I'm working on getting v7 for ondevice so hopefully I could solve this by getting us to v7 😅.

from react-native.

dannyhw avatar dannyhw commented on June 12, 2024

Test runner should work out of the box for react native web, it's no different than running for reactjs which is why there isn't specific documentation on that. If that doesn't work for you please let me know what issue you run into.

In terms of plans for testing I want to get unit testing working with composeStory and testing library. I've seen it work with some small hacks, i believe all that's needed is to take composeStory out of storybook/react and put a version of it in storybook/react-native.

Test runner on native is not really possible In the same way as far as i know. That's because we can't use testing library API's at runtime, they run in a sort of fake dom not a real rn app. The best we can do is a detox integration for example

automatic visual testing similar to chromatic is something that I've already prototyped and want to do but its a lot of work ahead.

once v7 is out i will put testing top of the list

from react-native.

flochtililoch avatar flochtililoch commented on June 12, 2024

test-runner is only compatible with Storybook 6.X until version 0.9.4, and installing 0.9.4 cause this issue locally for me:

 Validation Error:

  Module @storybook/test-runner/playwright/transform in the transform option was not found.
         <rootDir> is: /Users/f/project

  Configuration Documentation:
  https://jestjs.io/docs/configuration

Installing 0.16.0, or 0.12.0 as suggested here yields the same error.

Trying to remove this line to try skip the issue will then cause other errors pertaining to resolving modules internal to test-runner. Feels like I'm running into a dependency hell.

from react-native.

yannbf avatar yannbf commented on June 12, 2024

Hey @flochtililoch you could try checking this recipe out as an alternative to storyshots:
https://storybook.js.org/docs/writing-tests/storyshots-migration-guide#with-portable-stories

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.