/tests-javascript

Learning unit tests with Jest

Primary LanguageJavaScript

Counting vowels - Practicing TDD

This is the solution of the challenge proposed by Josélia Costa during the workshop "Conserta aqui e quebra ali: hora do TDD no JavaScript". The activity was part of the program of DoWhile, a RocketSeat event.

Using the principles of Test Driven Development, the project uses the JavaScript testing framework Jest to develop a function that receives a string and return the number of vowels.

Requirements:

  • Should be a function
  • Should be considered as vowels: a, e, i, o, u
  • The argument can be a single word or a sentence
  • The function should return an error if the parameter is not a string
  • It should count uppercase and lowercase vowels

Run the project

git clone https://github.com/alinenaoe/tests-javascript.git

yarn 

yarn test