Skip to content

Commit c16d093

Browse files
authored
fix: Fix config mocks (#862)
1 parent 13a6f6b commit c16d093

File tree

1 file changed

+2
-2
lines changed
  • packages/framework/esm-framework

1 file changed

+2
-2
lines changed

packages/framework/esm-framework/mock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function isOrdinaryObject(x) {
154154
return !!x && x.constructor === Object;
155155
}
156156

157-
export const getConfig = jest.fn().mockReturnValue(getDefaults(configSchema));
157+
export const getConfig = jest.fn().mockImplementation(() => Promise.resolve(getDefaults(configSchema)));
158158

159-
export const useConfig = jest.fn().mockReturnValue(getDefaults(configSchema));
159+
export const useConfig = jest.fn().mockImplementation(() => getDefaults(configSchema));
160160

161161
export function defineConfigSchema(moduleName, schema) {
162162
configSchema = schema;

0 commit comments

Comments
 (0)