News for hackers. Stuff that matters.
Re:Why is React is taking over front-end development? by onion2k on Wednesday May 10, 2017 @10:05AM (#14308245)
One of the big advantages of React is that it's straightforward to unit test your components. Plus there's Jest, which makes a lot of the hard bits of testing much easier.

(I say this as a developer who mostly uses Angular and Vue rather than React. I wish I had the React toolchain in other frameworks.)

Re:Why is React is taking over front-end development? by pmarreck on Wednesday May 10, 2017 @11:01AM (#14308700)
How would I run a React unit test from the command line? Or would I have to run it in-browser? Any pointers would be welcome
Re:Why is React is taking over front-end development? by onion2k on Wednesday May 10, 2017 @11:53AM (#14309166)
Jest uses jsdom. You just need to add it to a project ("npm install --save-dev jest"), write a spec, and then run npm test (maybe update package.json to have 'jest' as the test command). It's really, really easy.

There's even a repl so you can try it in a browser first - https://facebook.github.io/jest/#use