diff options
| author | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-05-03 08:25:22 +0000 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2018-05-03 08:25:22 +0000 |
| commit | b12d6546afba081a1fd64877daaf30b68efba618 (patch) | |
| tree | aee43f3ffdfda3ad0a4a2d2ba7d0430315bcabff /spec/javascripts/lib | |
| parent | 6aad7b4941a2e35177b8e175c86bd3558e1a2b59 (diff) | |
| download | gitlab-ce-b12d6546afba081a1fd64877daaf30b68efba618.tar.gz | |
Add pass through to stripHtml for undefined and null inputs
Diffstat (limited to 'spec/javascripts/lib')
| -rw-r--r-- | spec/javascripts/lib/utils/text_utility_spec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js b/spec/javascripts/lib/utils/text_utility_spec.js index ae00fb76714..eab5c24406a 100644 --- a/spec/javascripts/lib/utils/text_utility_spec.js +++ b/spec/javascripts/lib/utils/text_utility_spec.js @@ -75,6 +75,14 @@ describe('text_utility', () => { 'This is a text with html .', ); }); + + it('passes through with null string input', () => { + expect(textUtils.stripHtml(null, ' ')).toEqual(null); + }); + + it('passes through with undefined string input', () => { + expect(textUtils.stripHtml(undefined, ' ')).toEqual(undefined); + }); }); describe('convertToCamelCase', () => { |
