Added new algoritm (#433)

This commit is contained in:
Carlos Carvalho
2020-10-10 14:55:46 -03:00
committed by GitHub
parent e833b3fd40
commit de65d53a86
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { checkVowels } from './CheckVowels'
describe('Test the checkVowels function', () => {
it('expect throws on use wrong param', () => {
expect(() => checkVowels(0)).toThrow()
})
it('count the vowels in a string', () => {
const value = 'Mad World'
const countVowels = checkVowels(value)
expect(countVowels).toBe(2)
})
})