Skip to content

Commit

Permalink
fix: Fix config mocks (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandones authored Dec 24, 2023
1 parent 13a6f6b commit c16d093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/framework/esm-framework/mock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ function isOrdinaryObject(x) {
return !!x && x.constructor === Object;
}

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

export const useConfig = jest.fn().mockReturnValue(getDefaults(configSchema));
export const useConfig = jest.fn().mockImplementation(() => getDefaults(configSchema));

export function defineConfigSchema(moduleName, schema) {
configSchema = schema;
Expand Down

0 comments on commit c16d093

Please sign in to comment.