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:
parent
5001f34d3a
commit
b4d50d081b
@ -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");
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue
Block a user