Skip to content

Testing components within another application (without going through tag/export) #4633

Answered by itaymendel
AlexEBall asked this question in Help
Discussion options

You must be logged in to vote

hi @AlexEBall ,
there are two things you can do evaluating components before exporting:

Using compositions as "liability testing"

When there are certain cases where you want to test a component against a very specific use case, you can create a composition that mimics the page/flow/state/etc of the component for a specific use case (note - you can have several *.compositions.tsx files 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 spec file.

Internally we use this capability extensively.

bit link --target (experimental)

Y…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AlexEBall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants