redux-voting-client
redux-voting-client copied to clipboard
voting-client tests are failing
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) ? <div className="label">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