Testing components within another application (without going through tag/export) #4633
-
|
Wonder if anyone from Bit team or the community has come across this situation. We have several collections on Bit (App A) and we want other apps (App B... App n) to consume these components, but sometimes we want to test the App A components to make sure they're behaving correctly in the context of App B. Is there a way to connect App A components (or repo) with App B so that it allows for a quicker feedback loop while testing (i.e, going through several iterations, possibly modifying styles, logic, etc.) instead of modifying a component on App A tagging/exporting it to Bit, bumping the version in App B, @GiladShoham this was brought over from #technical-questions in Slack |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
hi @AlexEBall , Using
|
Beta Was this translation helpful? Give feedback.
hi @AlexEBall ,
there are two things you can do evaluating components before exporting:
Using
compositionsas "liability testing"When there are certain cases where you want to test a component against a very specific use case, you can create a
compositionthat mimics the page/flow/state/etc of the component for a specific use case (note - you can have several*.compositions.tsxfiles for a single component, just make sure to use different named exports). This way any developer maintaining that component knows they might "break" an important use-case.You can also test that composition by adding a
specfile.Internally we use this capability extensively.
bit link --target(experimental)Y…