Closed HenriBeck closed 5 years ago
Another benefit would be not to bundle the test code with the application code. Currently, because we are not using ESM, the testing code also gets bundled in the final bundle.
I like the explicit tsaga/testing
.
Wouldn't have thought bundling is an issue though, because even if one uses a simple bundler that only imports actually files it should be able to "go through" the index and find the implementation files, but leave the testing exports unregarded.
Because we bundle our code to CJS, it's not possible to remove unused files/functions because exports can have side effects.
I think there is an option to set side effects to false inside the package.json
to allow stripping unused files, but I would instead start bundling ESM.
I think it would be good to split out the test helpers from the main module export.
We could export them from
tsaga/testing
for example which will make it more clear for what acall
is being used for example.