Skip to content

#03 (expected , actual)  looks like the same,why? #66

Description

@liuestc

error:

  1. 03 - What's Your Name? should complete all tasks Task Create test-helpers for all tests #2 - don't greet user if name wasn't provided Should display welcoming message if user didn't provide their name:
  AssertionError: If user didn't enter the name (`this.state.name` length is 0), show "Hey there. Enter your name.". See the hint in task's description.
  + expected - actual

  -Hey there. Enter your name
  +Hey there. Enter your name.

looks like the same;why ?
my code :

render() {
var howdy = "Hello " + this.state.name;
if(this.state.name.length<=0)
howdy ='Hey there. Enter your name';

return (
  <div>
    <p>{howdy}</p>
    <input type="text" name="name" onChange={this.onNameChange} />
  </div>
);

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions