Commit a564a54b by Marcus Efraimsson Committed by GitHub

chore: mocks plugin loader for DataSourceSettingsPage tests (#17157)

Properly mocks the plugin loader in DataSourceSettingsPage tests 
and by that removes console logs.
parent 058f5a16
......@@ -8,6 +8,12 @@ import { setDataSourceName, setIsDefault } from '../state/actions';
const pluginMock = new DataSourcePlugin({} as DataSourceConstructor<any>);
jest.mock('app/features/plugins/plugin_loader', () => {
return {
importDataSourcePlugin: () => Promise.resolve(pluginMock),
};
});
const setup = (propOverrides?: object) => {
const props: Props = {
navModel: {} as NavModel,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment