mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
19 lines
936 B
TypeScript
19 lines
936 B
TypeScript
import {expect} from 'chai';
|
|
import {Utils} from '../../../src/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');
|
|
});
|
|
});
|