Reto tomado de wix/tdd-katas
- Try not to read ahead.
- Do one task at a time. The trick is to learn to work incrementally.
This kata demonstrates the problems of static scoped functions and objects.
All tests should always pass, regardless of environment conditions.
- Write a
Greeter
class withgreet
function that receives aname
as input and outputsHello <name>
. The signature ofgreet
should not change throughout the kata. You are allowed to constructGreeter
object as you please. greet
trims the inputgreet
capitalizes the first letter of the namegreet
returnsGood morning <name>
when the time is 06:00-12:00greet
returnsGood evening <name>
when the time is 18:00-22:00greet
returnsGood night <name>
when the time is 22:00-06:00greet
logs into console each time it is called