[MM-39839] Changes for writing unit tests, some re-org (#1849)
* Move tests to individual folders * Moved e2e tests to e2e folder, fixed lint issues * Lint fix
This commit is contained in:
18
src/common/utils/url.test.js
Normal file
18
src/common/utils/url.test.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
'use strict';
|
||||
|
||||
import assert from 'assert';
|
||||
|
||||
import urlUtils from 'common/utils/url';
|
||||
|
||||
describe('URL', () => {
|
||||
describe('parseURL', () => {
|
||||
it('should remove duplicate slashes in a URL when parsing', () => {
|
||||
const urlWithExtraSlashes = 'https://mattermost.com//sub//path//example';
|
||||
const parsedURL = urlUtils.parseURL(urlWithExtraSlashes);
|
||||
|
||||
assert.strictEqual(parsedURL.toString(), 'https://mattermost.com/sub/path/example');
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user