mirror of
https://github.com/grafana/grafana.git
synced 2026-08-16 08:04:59 -05:00
17 lines
418 B
TypeScript
17 lines
418 B
TypeScript
import locationUtil from 'app/core/utils/location_util';
|
|||
|
|
|
||
|
|
jest.mock('app/core/config', () => {
|
||
|
|
return {
|
||
|
|
appSubUrl: '/subUrl',
|
||
|
|
};
|
||
|
|
});
|
||
|
|
|
||
|
|
describe('locationUtil', () => {
|
||
|
|
describe('With /subUrl as appSubUrl', () => {
|
||
|
|
it('/subUrl should be stripped', () => {
|
||
|
|
const urlWithoutMaster = locationUtil.stripBaseFromUrl('/subUrl/grafana/');
|
||
|
|
expect(urlWithoutMaster).toBe('/grafana/');
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|