+
Skip to content

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

@liuestc

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>
);

}

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载