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