mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Context start * More progress on more generic react context for services * Update * Update Page test * Fixing tests * Moving to core app
19 lines
707 B
TypeScript
19 lines
707 B
TypeScript
import { GrafanaConfig } from '@grafana/data';
|
|
import { BackendSrv, LocationService } from '@grafana/runtime';
|
|
import { AppChromeService } from 'app/core/components/AppChrome/AppChromeService';
|
|
import { GrafanaContextType } from 'app/core/context/GrafanaContext';
|
|
|
|
/** Not sure what this should evolve into, just a starting point */
|
|
export function getGrafanaContextMock(overrides: Partial<GrafanaContextType> = {}): GrafanaContextType {
|
|
return {
|
|
chrome: new AppChromeService(),
|
|
// eslint-disable-next-line
|
|
backend: {} as BackendSrv,
|
|
// eslint-disable-next-line
|
|
location: {} as LocationService,
|
|
// eslint-disable-next-line
|
|
config: {} as GrafanaConfig,
|
|
...overrides,
|
|
};
|
|
}
|