mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore: mocks plugin loader for DataSourceSettingsPage tests (#17157)
Properly mocks the plugin loader in DataSourceSettingsPage tests and by that removes console logs.
This commit is contained in:
parent
058f5a1682
commit
a564a54b13
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user