Fork me on GitHub
#polylith
<
2021-11-16
>
yenda23:11:19

Is poly test running the tests of a changed component once per project that uses it?

seancorfield23:11:35

I would expect so, yes, since the context for running the test could be different across projects.

seancorfield23:11:24

For example, at work, we have two HTTP client components so a component whose tests depend on HTTP would actually run differently depending on which client implementation a specific project selected.

yenda00:11:12

OK makes sense, thanks!

tengstrand06:11:40

You can add a :test key with the value []or {:include []}to exclude testing of all bricks of a project in workspace.edn, key :projects(read more in the https://polylith.gitbook.io/poly/workflow/testing section). If you are sure that the brick tests would be executed the same in several projects, this can be an option to speed up the testing. It can also be a risk, because if some configuration changes between projects that affects the tests, then that will not be caught by the tests. With that said, the Polylith workspace uses it (excluding the https://github.com/polyfy/polylith/blob/master/workspace.edn tests).