mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix hotbar store tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
bbf6ec38bf
commit
c4a8604b25
@ -19,6 +19,7 @@ import loggerInjectable from "../logger.injectable";
|
|||||||
import type { Logger } from "../logger";
|
import type { Logger } from "../logger";
|
||||||
import directoryForUserDataInjectable from "../app-paths/directory-for-user-data/directory-for-user-data.injectable";
|
import directoryForUserDataInjectable from "../app-paths/directory-for-user-data/directory-for-user-data.injectable";
|
||||||
import storeMigrationVersionInjectable from "../vars/store-migration-version.injectable";
|
import storeMigrationVersionInjectable from "../vars/store-migration-version.injectable";
|
||||||
|
import fsInjectable from "../fs/fs.injectable";
|
||||||
|
|
||||||
function getMockCatalogEntity(data: Partial<CatalogEntityData> & CatalogEntityKindData): CatalogEntity {
|
function getMockCatalogEntity(data: Partial<CatalogEntityData> & CatalogEntityKindData): CatalogEntity {
|
||||||
return {
|
return {
|
||||||
@ -46,7 +47,7 @@ describe("HotbarStore", () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
di = getDiForUnitTesting({ doGeneralOverrides: true });
|
di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||||
|
|
||||||
(di as any).unoverride(hotbarStoreInjectable);
|
di.unoverride(hotbarStoreInjectable);
|
||||||
|
|
||||||
testCluster = getMockCatalogEntity({
|
testCluster = getMockCatalogEntity({
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
@ -112,8 +113,8 @@ describe("HotbarStore", () => {
|
|||||||
catalogCatalogEntity,
|
catalogCatalogEntity,
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
di.permitSideEffects(fsInjectable);
|
||||||
di.permitSideEffects(getConfigurationFileModelInjectable);
|
di.permitSideEffects(getConfigurationFileModelInjectable);
|
||||||
di.permitSideEffects(hotbarStoreInjectable);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user