mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* feat: Allow built versions to specify an environment - This should be hard coded at build time Signed-off-by: Sebastian Malton <sebastian@malton.name> * chore: Add default value to open-lens Signed-off-by: Sebastian Malton <sebastian@malton.name> * chore: Add --no-bail to test script invocations Signed-off-by: Sebastian Malton <sebastian@malton.name> * chore: Add tests for coverage of new code Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name>
23 lines
637 B
TypeScript
23 lines
637 B
TypeScript
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");
|
|
});
|
|
});
|