1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

chore: Add tests for coverage of new code

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-04-03 16:10:30 -04:00
parent 5001f34d3a
commit b4d50d081b

View File

@ -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");
});
});