mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add handlers to mock server
This commit is contained in:
parent
341449f4f5
commit
10fcd541e3
@ -5,6 +5,7 @@ import { setupServer, SetupServer } from 'msw/node';
|
||||
import { DataSourceInstanceSettings, PluginMeta } from '@grafana/data';
|
||||
import { setBackendSrv } from '@grafana/runtime';
|
||||
import { AlertRuleUpdated } from 'app/features/alerting/unified/api/alertRuleApi';
|
||||
import allHandlers from 'app/features/alerting/unified/mocks/server/handlers';
|
||||
import { DashboardDTO, FolderDTO, NotifierDTO, OrgUser } from 'app/types';
|
||||
import {
|
||||
PromBuildInfoResponse,
|
||||
@ -424,7 +425,7 @@ export function mockDashboardApi(server: SetupServer) {
|
||||
};
|
||||
}
|
||||
|
||||
const server = setupServer();
|
||||
const server = setupServer(...allHandlers);
|
||||
|
||||
// Creates a MSW server and sets up beforeAll, afterAll and beforeEach handlers for it
|
||||
export function setupMswServer() {
|
||||
|
Loading…
Reference in New Issue
Block a user