mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Added new algoritm (#433)
This commit is contained in:
12
String/CheckVowels.test.js
Normal file
12
String/CheckVowels.test.js
Normal 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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user