Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think there may be a problem with one of the test cases.
If I understand correctly, the default value of state.name should be either props.name or 'Yeti' if props.name does not exist.
I pass all tests except this one case:
"Controlled Beast with empty beast name passed should set the default name to empty"
Expected: '', instead got: 'Yeti'
this is my code below:
https://codesandbox.io/s/codewars-control-the-beast-challenge-8t9zo?file=/src/Beast.js
As you can see in the sandbox, the default value of state.name is set to 'Yeti' but also, if you delete the text in the input field, state.name remains as "", which should pass the test I mentioned above.