mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-12 11:15:22 +02:00
19 lines
932 B
TypeScript
19 lines
932 B
TypeScript
import {expect} from 'chai';
|
|
import {Utils} from '../../../common/Utils';
|
|
|
|
describe('Utils', () => {
|
|
it('should concat urls', () => {
|
|
expect(Utils.concatUrls('abc', 'cde')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc/', 'cde')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc\\', 'cde')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc/', 'cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('./abc\\', 'cde/')).to.be.equal('./abc/cde');
|
|
expect(Utils.concatUrls('abc/', '\\cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc\\', '\\cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc\\', '/cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc/', '/cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc\\/', '/cde/')).to.be.equal('abc/cde');
|
|
expect(Utils.concatUrls('abc\\/', '/cde/', 'fgh')).to.be.equal('abc/cde/fgh');
|
|
});
|
|
});
|