Can someone point me to the canonical reference for testing an external module?
I assumed I could just set it up as a CB application in it’s own right and have tests sitting side-by-side with the module.
This would make the most sense to me as you are then testing the module in isolation.
Then when included into an app I would have app-specific integration tests.
When I setup the bones of an application in order to run unit tests it throws DSL errors relating to the DI call in the default handler. Specifically the id:Service@module syntax
Appreciate any direction in this. Is there some module on github somewhere that includes tests? How do you all do it?
At the moment I’m skipping the tests… which feels OH SO DIRTY after getting used to TDD
Cheers guys
Steve
That’s fine - I have a history of posting rambling questions with ill-defined points.
I have a module that I only refer to externally.
I want to write unit tests (and to some extent integration tests as well) for the module.
I guess I could create a test bed application which loads the module in, and then have tests within that test bed execute against the module.
But that feels clunky. If only because if I ever decide to make the module available publicly the tests won’t exist in the same repo.
I would have thought this was a pretty common scenario. Am I wrong?
Cheers
Steve
Ahh ok. Now the thing is that if you write the integration tests you need a event string and that will change if its a module or a standalone app. I would recommend developing it in a shell empty app. I do that
Thanks
Do you then bundle the shell app if you release the module?
Or do you release the module sans tests?