Replace a dependency to full implementation with an interface to allow minimal stubbing

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2021-12-28 11:51:34 +02:00
1 parent a9189f82e6
commit 13873f5d85
4 files changed
+72 -46

No files matched your search

@@ -18,15 +18,15 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { lifecycleEnum } from "@ogre-tools/injectable";
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { ExtensionLoader } from "./extension-loader";
import extensionsStoreInjectable from "../extensions-store/extensions-store.injectable";
import updateExtensionsStateInjectable from "./update-extensions-state/update-extensions-state.injectable";
const extensionLoaderInjectable = getInjectable({
instantiate: (di) => new ExtensionLoader({
extensionsStore: di.inject(extensionsStoreInjectable),
}),
instantiate: (di) =>
new ExtensionLoader({
updateExtensionsState: di.inject(updateExtensionsStateInjectable),
}),
lifecycle: lifecycleEnum.singleton,
});