fix tests
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { PanelCtrl, MetricsPanelCtrl } from './panelStub';
|
||||
|
||||
console.log = () => {};
|
||||
|
||||
// Mock Grafana modules that are not available outside of the core project
|
||||
// Required for loading module.js
|
||||
jest.mock('angular', () => {
|
||||
@@ -18,6 +20,14 @@ jest.mock('angular', () => {
|
||||
};
|
||||
}, {virtual: true});
|
||||
|
||||
jest.mock('@grafana/runtime', () => {
|
||||
return {
|
||||
getBackendSrv: () => ({
|
||||
datasourceRequest: jest.fn().mockResolvedValue(),
|
||||
}),
|
||||
};
|
||||
}, {virtual: true});
|
||||
|
||||
jest.mock('grafana/app/core/core_module', () => {
|
||||
return {
|
||||
directive: function() {},
|
||||
|
||||
Reference in New Issue
Block a user