test: Implement the structure of mocking appConfig options

This commit is contained in:
Faruk AYDIN
2023-10-18 15:45:54 +02:00
parent 14886d42e8
commit b2205097da
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
export const mockConfigState = {
isCloud: false,
};
export const resetMockConfig = () => {
for (const key in mockConfigState) {
delete (mockConfigState as any)[key];
}
};
export const setMockConfig = (config: Partial<typeof mockConfigState>) => {
Object.assign(mockConfigState, config);
};