echenley / react-news

Hacker News clone written in React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests with Jest

gothy opened this issue · comments

Hi @echenley
Thanks for this example app in reflux!
I would like to know if you plan to cover it with tests Jest\Jasmine? That would be a really great addition to fulfil the gap in this area since it's not covered in reflux docs.

I'd love to add tests, though admittedly testing is not my strong suit. I'm going to start writing a few here and there, and I'm certainly open to PRs if anyone was so inclined. :)

@gothy I've had a hell of a time even writing one React component test with Jest. Honestly, Jest feels a little half-baked as of v0.5.0. It really makes you bend over backwards with certain dependencies (e.g. React-Router remix-run/react-router#739) and only works with certain versions of Node/io.js (jestjs/jest#243). I'm going to see if I can get going with another test framework—possibly Mocha, following the lead of react-starter-kit (kriasoft/react-starter-kit#78).

He references these posts, which seem pretty juicy:
Testing React Apps with Mocha (part 1)
Testing React Apps with Mocha (part 2)