Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-21 15:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-21 15:08:33 +0300
commit6c44b676312eb6cdffadef45f9ca3e29a8cc92ab (patch)
tree06666cd369ac9ad0533cec689f2c2b4fb826f797 /spec/frontend/lib
parentc1cea595b6a9b4d85424e9afd2cb765101ee04bf (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r--spec/frontend/lib/utils/text_utility_spec.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/frontend/lib/utils/text_utility_spec.js b/spec/frontend/lib/utils/text_utility_spec.js
index 8f1f6899935..b7d6bbd3991 100644
--- a/spec/frontend/lib/utils/text_utility_spec.js
+++ b/spec/frontend/lib/utils/text_utility_spec.js
@@ -238,36 +238,6 @@ describe('text_utility', () => {
});
});
- describe('truncatePathMiddleToLength', () => {
- it('does not truncate text', () => {
- expect(textUtils.truncatePathMiddleToLength('app/test', 50)).toEqual('app/test');
- });
-
- it('truncates middle of the path', () => {
- expect(textUtils.truncatePathMiddleToLength('app/test/diff', 13)).toEqual('app/…/diff');
- });
-
- it('truncates multiple times in the middle of the path', () => {
- expect(textUtils.truncatePathMiddleToLength('app/test/merge_request/diff', 13)).toEqual(
- 'app/…/…/diff',
- );
- });
-
- describe('given a path too long for the maxWidth', () => {
- it.each`
- path | maxWidth | result
- ${'aa/bb/cc'} | ${1} | ${'…'}
- ${'aa/bb/cc'} | ${2} | ${'…'}
- ${'aa/bb/cc'} | ${3} | ${'…/…'}
- ${'aa/bb/cc'} | ${4} | ${'…/…'}
- ${'aa/bb/cc'} | ${5} | ${'…/…/…'}
- `('truncates ($path, $maxWidth) to $result', ({ path, maxWidth, result }) => {
- expect(result.length).toBeLessThanOrEqual(maxWidth);
- expect(textUtils.truncatePathMiddleToLength(path, maxWidth)).toEqual(result);
- });
- });
- });
-
describe('slugifyWithUnderscore', () => {
it('should replaces whitespaces with underscore and convert to lower case', () => {
expect(textUtils.slugifyWithUnderscore('My Input String')).toEqual('my_input_string');