Add handlers to mock server

This commit is contained in:
Tom Ratcliffe 2024-04-25 16:36:57 +01:00 committed by Tom Ratcliffe
parent 341449f4f5
commit 10fcd541e3

View File

@ -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() {