Commit 23cceaec by Johannes Schill

test: Update test with new component signature

parent fee3e7c0
import { GlobalEventSrv } from 'app/core/services/global_event_srv'; import { GlobalEventSrv } from "app/core/services/global_event_srv";
import { beforeEach } from 'test/lib/common'; import { beforeEach } from "test/lib/common";
jest.mock('app/core/config', () => { jest.mock("app/core/config", () => {
return { return {
appSubUrl: '/subUrl' appSubUrl: "/subUrl"
}; };
}); });
describe('GlobalEventSrv', () => { describe("GlobalEventSrv", () => {
let searchSrv; let searchSrv;
beforeEach(() => { beforeEach(() => {
searchSrv = new GlobalEventSrv(null, null); searchSrv = new GlobalEventSrv(null, null, null);
}); });
describe('With /subUrl as appSubUrl', () => { describe("With /subUrl as appSubUrl", () => {
it('/subUrl should be stripped', () => { it("/subUrl should be stripped", () => {
const urlWithoutMaster = searchSrv.stripBaseFromUrl('/subUrl/grafana/'); const urlWithoutMaster = searchSrv.stripBaseFromUrl("/subUrl/grafana/");
expect(urlWithoutMaster).toBe('/grafana/'); expect(urlWithoutMaster).toBe("/grafana/");
}); });
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment