microsoft / TypeScript-React-Starter

A starter template for TypeScript and React with a detailed README describing how to use the two together.
MIT License
11.08k stars 1.21k forks source link

Fixed Hello constructor this.state.currentEnthusiasm assigment #260

Closed aviyadeveloper closed 1 year ago

aviyadeveloper commented 5 years ago

There's was an overlooked behavior inconsistency between the assignment of this.state.currentEnthusiasm assigment at the Hello component constructor and the expect behavior in the test 'throws when the enthusiasm level is 0'.

I fixed the assignment rather than the test itself so that the wanted behavior will work. When enthusiamLevel is 0 it will now actually throw and error instead of bypassing the falsy value and setting this.state.currentEnthusiasm to 1.