From 6c44b676312eb6cdffadef45f9ca3e29a8cc92ab Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 21 Jul 2023 12:08:33 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/lib/utils/text_utility_spec.js | 30 ---------------------------- 1 file changed, 30 deletions(-) (limited to 'spec/frontend/lib') 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'); -- cgit v1.2.3