mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
26 lines
636 B
JavaScript
26 lines
636 B
JavaScript
jest.dontMock('../web-api-utils');
|
|
|
|
describe('WebApiUtils', function() {
|
|
const WebApiUtils = require('../web-api-utils');
|
|
|
|
describe('basePath', function() {
|
|
const basePath = WebApiUtils.basePath;
|
|
|
|
it('should handle /scope/terminal.html', function() {
|
|
expect(basePath('/scope/terminal.html')).toBe('/scope');
|
|
});
|
|
|
|
it('should handle /scope/', function() {
|
|
expect(basePath('/scope/')).toBe('/scope');
|
|
});
|
|
|
|
it('should handle /scope', function() {
|
|
expect(basePath('/scope')).toBe('/scope');
|
|
});
|
|
|
|
it('should handle /', function() {
|
|
expect(basePath('/')).toBe('');
|
|
});
|
|
});
|
|
});
|