Files
mattermostest/src/common/utils/url.test.js
Devin Binnie 0bd5a54c76 [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
2021-11-04 11:29:32 -04:00

19 lines
610 B
JavaScript

// 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');
});
});
});