Using ‘@testable’ in a demo project

Hi, can you please explain if this the following example a valid point to use @testable’?

In a framework that contains both UI and logic, we can assume a feature, most of the code have ‘internal’ access level and only some entry points to the framework have ‘public’. The project has a test target in which we are testing internal implementation of the framework, with ‘@testable import’ to be able to have access for testing.
The project also has a demo project in which we mock some input parameters to be able to use ”demo” the project.
My question is it fine to use the ‘@testable’ in the demo project?

  • To show only small(‘internal’) elements of the framework with different states;
  • “Demo” only some part of the flow without providing unnecessary parameters for a demo case.

Maybe some pros/cons for the flow?

If the purpose of your demo is to show how it is tested, then yes @testable is exactly what you want.
Showing small/internal components and how they work is not a function of @testable. Running the app and demoing a flow, we do not use @testable

I mean for example, in the framework we have an ‘internal’ view - CTA button, and I just want present at in the demo project multiple of them in the same view with different statuses(copies/configurations/colors) just easier to see the different, but not mocking the whole ‘public’ flow.

I understand testable only change the ‘internal’ to ‘public’, and ‘public’ to ‘open’