Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voting-client tests are failing #14

Open
mars76 opened this issue Dec 31, 2015 · 0 comments
Open

voting-client tests are failing #14

mars76 opened this issue Dec 31, 2015 · 0 comments

Comments

@mars76
Copy link

mars76 commented Dec 31, 2015

Hi ,

When i run npm run test in voting-client the tests are failing.

I didn't fork the project. I followed the blog and built the project and the versions are different and hence the error.

Here are the versions i have in my package.json

"devDependencies": {
"chai": "^3.4.1",
"chai-immutable": "^1.5.3",
"immutable": "^3.7.6",
"jsdom": "^3.1.2",
"mocha": "^2.3.4",
"react-hot-loader": "^1.3.0",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
},
"dependencies": {
"immutable": "^3.7.6",
"react": "^0.14.5",
"react-addons-test-utils": "^0.14.5",
"react-dom": "^0.14.5"
}

Also one more thing i noticed is

We have the following in Vote.jsx (in the blog this was in Voting.jsx before the following is moved to Vote.jsx)

<button key={entry}
className={classNames({voted: this.hasVotedFor(entry)})}
disabled={this.isDisabled()}
onClick={() => this.props.vote(entry)}>

{entry}


{this.hasVotedFor(entry) ?
Voted
:
null}

And there is no vote() function !! and how come this worked ?? I am getting the error
TypeError: string is not a function
at onClick (Voting.jsx:12:49)
at Object.invokeGuardedCallback as invokeGuardedCallbackWithCatch

As some one posted in other issue i am using react-addons-test-utils as i got the deprecated error with react/addons

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant