mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +08:00
Added test for ScrambleStrings and formatted folder structure for other folders
This commit is contained in:
12
String/test/MaxCharacter.test.js
Normal file
12
String/test/MaxCharacter.test.js
Normal 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')
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user