test: Implement the structure of mocking appConfig options
This commit is contained in:
13
packages/backend/test/setup/set-mock-config.ts
Normal file
13
packages/backend/test/setup/set-mock-config.ts
Normal 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);
|
||||
};
|
Reference in New Issue
Block a user