|
| 1 | +import { upperCaseConversion } from "../UpperCaseConversion"; |
| 2 | + |
| 3 | +describe(('Test the upperCaseConversion function'), () => { |
| 4 | + it('should return an empty string when the input is an empty string', () => { |
| 5 | + expect(upperCaseConversion('')).toEqual('') |
| 6 | + }) |
| 7 | + |
| 8 | + it('should return an all-uppercase string when input is an all-uppercase string', () => { |
| 9 | + expect(upperCaseConversion('ALLUPPERCASE')).toEqual('ALLUPPERCASE') |
| 10 | + }) |
| 11 | + |
| 12 | + it('should return an all-uppercase string when input is an all-uppercase string with spaces', () => { |
| 13 | + expect(upperCaseConversion('ALL UPPERCASE')).toEqual('ALL UPPERCASE') |
| 14 | + }) |
| 15 | + |
| 16 | + it('should return an all-uppercase string when input is an all-uppercase string with punctuation', () => { |
| 17 | + expect(upperCaseConversion('ALL UPPER-CASE!')).toEqual('ALL UPPER-CASE!') |
| 18 | + }) |
| 19 | + |
| 20 | + it('should return an all-uppercase string when input is an all-lowercase string', () => { |
| 21 | + expect(upperCaseConversion('lowercaseinput')).toEqual('LOWERCASEINPUT') |
| 22 | + }) |
| 23 | + |
| 24 | + it('should return an all-uppercase string when input is an all-lowercase string with spaces', () => { |
| 25 | + expect(upperCaseConversion('lowercase input')).toEqual('LOWERCASE INPUT') |
| 26 | + }) |
| 27 | + |
| 28 | + it('should return an all-uppercase string when input is an all-lowercase string with punctuation', () => { |
| 29 | + expect(upperCaseConversion('lower-case, input.')).toEqual('LOWER-CASE, INPUT.') |
| 30 | + }) |
| 31 | + |
| 32 | + it('should return an all-uppercase string when input is an mixed-case string', () => { |
| 33 | + expect(upperCaseConversion('mixeDCaSeINPuT')).toEqual('MIXEDCASEINPUT') |
| 34 | + }) |
| 35 | + |
| 36 | + it('should return an all-uppercase string when input is an mixed-case string with spaces', () => { |
| 37 | + expect(upperCaseConversion('mixeD CaSe INPuT')).toEqual('MIXED CASE INPUT') |
| 38 | + }) |
| 39 | + |
| 40 | + it('should return an all-uppercase string when input is an mixed-case string with punctuation', () => { |
| 41 | + expect(upperCaseConversion('mixeD-CaSe INPuT!')).toEqual('MIXED-CASE INPUT!') |
| 42 | + }) |
| 43 | +}) |
0 commit comments