Added new algoritm

This commit is contained in:
Carlos Carvalho
2020-10-06 23:50:42 -03:00
parent 7dfcfef794
commit c7517885a2
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import { maxCharacter } from './MaxCharacter'
describe('Testing the maxCharacter function', () => {
it('Expect throw with wrong arg', () => {
expect(() => maxCharacter(123)).toThrow()
})
it('Check the max character in string', () => {
const theString = 'I can\'t do that'
const maxChar = maxCharacter(theString)
expect(maxChar).toBe('t')
})
})