mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
16 lines
473 B
TypeScript
16 lines
473 B
TypeScript
|
import { spliceURL } from '../src/string';
|
||
|
|
||
|
describe('spliceURL', () => {
|
||
|
test('should splice two strings and generate a url', () => {
|
||
|
const url: string = spliceURL('http://domain.com', '/-/static/logo.png');
|
||
|
|
||
|
expect(url).toMatch('http://domain.com/-/static/logo.png');
|
||
|
});
|
||
|
|
||
|
test('should splice a empty strings and generate a url', () => {
|
||
|
const url: string = spliceURL('', '/-/static/logo.png');
|
||
|
|
||
|
expect(url).toMatch('/-/static/logo.png');
|
||
|
});
|
||
|
});
|