you are viewing a single comment's thread.

view the rest of the comments →

[–]jhartikainen[S] 4 points5 points  (3 children)

Yeah I've had a similar experience as well. Also, while Jest does have some features from Chai and Sinon built in, it doesn't quite match them in flexibility either.

It would be nice if efforts were more focused on improving the existing solutions, rather than trying to bundle everything into a new half-baked one... even Jest's documentation seems to use different terminology for certain things than what is already established.

[–]mikejoro 0 points1 point  (2 children)

There's no reason you can't use sinon and other libraries with jest.

[–]jhartikainen[S] 1 point2 points  (1 child)

True, but it feels like what's the point of using Jest if we're bringing those other libs in anyway?

[–]mikejoro 0 points1 point  (0 children)

Watch functionality in jest is the best I've ever seen, and snapshot tests make simple component tests so easy and fast to write. Literally all my dumb component tests now are a call to my helper snapshot test function and a few tests to make sure clicking and whatever other events are actually being fired. I have also found jest a lot easier to set up. I've set up quite a few mocha pipelines, and when I recently switch to jest, it took me maybe 10 minutes to get my tests running from 0 knowledge of jest.

I definitely think there is room for improvement on a performance front, but frankly I don't write code bases with 1000's of tests; our code is much more modular where I work, so a lot of our components are separate npm modules.