diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-06 00:08:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-06 00:08:33 +0300 |
commit | 9dc655286f773d1e9efef83df7fb53241d720ee3 (patch) | |
tree | 0feb8894389fef71de019f654f2e40f15d2aac58 /spec/frontend/lib | |
parent | 04af78083ec8cfabc6bba6604855b1c7c4de04f2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r-- | spec/frontend/lib/utils/url_utility_spec.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/frontend/lib/utils/url_utility_spec.js b/spec/frontend/lib/utils/url_utility_spec.js index 2c6b603197d..6afdab455a6 100644 --- a/spec/frontend/lib/utils/url_utility_spec.js +++ b/spec/frontend/lib/utils/url_utility_spec.js @@ -759,6 +759,19 @@ describe('URL utility', () => { }); }); + describe('cleanEndingSeparator', () => { + it.each` + path | expected + ${'foo/bar'} | ${'foo/bar'} + ${'/foo/bar/'} | ${'/foo/bar'} + ${'foo/bar//'} | ${'foo/bar'} + ${'foo/bar/./'} | ${'foo/bar/.'} + ${''} | ${''} + `('$path becomes $expected', ({ path, expected }) => { + expect(urlUtils.cleanEndingSeparator(path)).toBe(expected); + }); + }); + describe('joinPaths', () => { it.each` paths | expected |