From b4d50d081b349db39299c30d3651689cd6659ad7 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 3 Apr 2023 16:10:30 -0400 Subject: [PATCH] chore: Add tests for coverage of new code Signed-off-by: Sebastian Malton --- .../agnostic/src/environment-token.test.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/technical-features/application/agnostic/src/environment-token.test.ts diff --git a/packages/technical-features/application/agnostic/src/environment-token.test.ts b/packages/technical-features/application/agnostic/src/environment-token.test.ts new file mode 100644 index 0000000000..bece4e0ac7 --- /dev/null +++ b/packages/technical-features/application/agnostic/src/environment-token.test.ts @@ -0,0 +1,22 @@ +import { createContainer, DiContainer, getInjectable } from "@ogre-tools/injectable"; +import { lensBuildEnvironmentInjectionToken } from "./environment-token"; + +describe("environment-token coverage tests", () => { + let di: DiContainer; + + beforeEach(() => { + di = createContainer("irrelevant"); + }); + + it("should be able to specify a build environment", () => { + di.register( + getInjectable({ + id: "some-id", + instantiate: () => "some-value", + injectionToken: lensBuildEnvironmentInjectionToken, + }), + ); + + expect(di.inject(lensBuildEnvironmentInjectionToken)).toBe("some-value"); + }); +});