mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-14 18:03:53 +08:00
13 lines
370 B
JavaScript
13 lines
370 B
JavaScript
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')
|
|
})
|
|
})
|