mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Mock core in jest-setup
This commit is contained in:
parent
d91e9ddd22
commit
72ecf72c45
@ -1,4 +1,22 @@
|
||||
import { configure } from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
import 'jquery';
|
||||
import $ from 'jquery';
|
||||
import 'angular';
|
||||
import angular from 'angular';
|
||||
|
||||
angular.module('grafana', ['ngRoute']);
|
||||
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
|
||||
angular.module('grafana.panels', []);
|
||||
angular.module('grafana.controllers', []);
|
||||
angular.module('grafana.directives', []);
|
||||
angular.module('grafana.filters', []);
|
||||
angular.module('grafana.routes', ['ngRoute']);
|
||||
|
||||
jest.mock('app/core/core', () => ({}));
|
||||
jest.mock('app/features/plugins/plugin_loader', () => ({}));
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
|
||||
var global = <any>window;
|
||||
global.$ = global.jQuery = $;
|
||||
|
Loading…
Reference in New Issue
Block a user