Skip to content

Commit

Permalink
Refactor useConfig call in FederableApp and update mock implementatio…
Browse files Browse the repository at this point in the history
…n in setupTests
  • Loading branch information
hervedombya committed Jan 18, 2025
1 parent 6518f59 commit dd7bc2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/FederableApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type Config = {
export const useConfig = () => {
const { name } = useCurrentApp();
const { useConfig } = useShellHooks();
const runtimeConfiguration = useConfig<Config>({
const runtimeConfiguration = useConfig({
configType: 'run',
name,
});
Expand Down
2 changes: 1 addition & 1 deletion ui/src/setupTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ jest.mock('@scality/module-federation', () => {
appHistoryBasePath: '',
};
}),
useBasenameRelativeNavigate: jest.fn(),
useBasenameRelativeNavigate: jest.fn(() => jest.fn()),
ShellHooksProvider: ({ children }) => <>{children}</>,
useShellHooks: () => mockShellHooks,
useShellAlerts: () => mockShellAlerts,
Expand Down

0 comments on commit dd7bc2b

Please sign in to comment.