Migrating to Jest test runner

I have already shared my comparison of two JavaScript testing solutions where I admitted that I favor Jest over Mocha. Back then, I listed all major differences between those tools summarized with advantages and disadvantages of migrating to Jest:

Pros:

  • Simpler API, less boilerplate code.
  • Flexible and easy configuration.
  • Test files executed in isolation.
  • Advanced watch mode.
  • Snapshots support = easier start with testing.
  • Code coverage.

Cons:

  • Another migration.
  • Mocha has still a bit better performance (according to my quick tests).

My analysis got very positive feedback, with only a few little concerns, so I got encouraged to take action and verify the assumptions stated. I picked two different projects to play with to ensure both of them will uniformly benefit from using Jest.

Continue reading Migrating to Jest test runner

Picking Jest over Mocha – testing tools comparison

At Automattic we use Mocha to run all tests written for Calypso project which powers WordPress.com. It also includes end-to-end tests, which live in their own repository. We have been using this setup for over 3 years now. I think it is a good moment to revisit this choice. I found this unit testing tools comparison very helpful when evaluating alternatives. I strongly agree with the conclusions shared by Martin Olsson in his article:

Staying with Javascript, I think it’s hard to ignore the momentum behind Jest. I would be awesome if someone fixed #2059 though. Then again, Mocha seems to work well enough for a lot of people.

Continue reading Picking Jest over Mocha – testing tools comparison

ReactJS Wrocław meetup #7

In September of this year, I experienced my first exposure to the art of public speaking. I gave a talk at ReactJS Wrocław #7 meetup. I already published my presentation on my blog and you can find it here. I’m glad that I decided to share my lessons learned while working on the Calypso project. I’m satisfied with the topic I picked, but I’m afraid I could do a way better job explaining code examples I presented. It looks like I’m going to have plenty of opportunities to work on projects based on React in the upcoming year. I’m looking forward to it and I hope to find another excuse to speak to the audience again.

Continue reading ReactJS Wrocław meetup #7

Calypso data kung fu – WordPress.com use case

This post is going to be used as a presentation during my upcoming talk at ReactJS Wrocław meetup. The event is planned for Thursday, September 29, 2016 at 19.00. You can find more details here.

Calypso

Calypso is the codename for a WordPress.com admin interface. This is what I wrote about it in one of my previous posts:

This is a universal (aka isomorphic) JavaScript single page app written in ES6 using webpack, express, ReactFlux Redux, WordPress Rest API and many other front-end libraries.

Continue reading Calypso data kung fu – WordPress.com use case

Calypso – new WordPress.com

I’ve been working at Automattic only for 8 months now, but I must admit that so far this is the most exciting period of my 10 years long professional career. I’m lucky to work with amazing people on new WordPress.com admin interface called Calypso. This is an universal (aka isomorphic) JavaScript single page app written in ES6 using webpack, express, ReactFlux, WordPress Rest API and many other front-end libraries.

Continue reading Calypso – new WordPress.com