StanfordSpezi / Spezi

Open-source framework for rapid development of modern, interoperable digital health applications.
https://swiftpackageindex.com/StanfordSpezi/Spezi/documentation
MIT License
130 stars 10 forks source link

Validate That Modules Are Only Created Once #76

Open PSchmiedmayer opened 11 months ago

PSchmiedmayer commented 11 months ago

Problem

We currently have no unit test that validates that modules are actually only instantiated once using the Spezi configuration mechanism. We have that implicit assumption but need to ensure that modules are only instantiated once, even if they are defined as dependencies using an initializer as well as module configurations in the configuration.

Solution

Create a small unit test that validates this functionality.

Additional context

This would be a great first issue for someone who wants to get familiar with the dependency management mechanism in Spezi.

Code of Conduct