Skip to content
Permalink
Browse files

Update README.md

  • Loading branch information
nrleak authored and asimpson committed Dec 9, 2019
1 parent b60dd29 commit 5fcff43a896f21d25b59cf7b77cbb0e480065610
Showing with 4 additions and 4 deletions.
  1. +4 −4 code-style/javascript/README.md
@@ -42,11 +42,11 @@ Automated testing is an important part of our development process. Here are some

### Mocha vs Jest comparison

Mocha is a fast, highly configurable test runner, but does not provide assertions or mocking out of the box. At Sparkbox, we typically use a combination of Mocha + Chai + Sinon, rolling in jsdom or Enzyme when appropriate for component testing.
Mocha is a fast, highly-configurable test runner but does not provide assertions or mocking out of the box. At Sparkbox, we typically use a combination of Mocha + Chai + Sinon, rolling in jsdom or Enzyme when appropriate for component testing.

Jest, on the other hand, provides a complete "out of the box" testing solution, including assertions, mocking and jsdom with zero configuration. The downside of Jest is that it can run significantly slower than Mocha, particularly with large test suites.
Jest, on the other hand, provides a complete "out of the box" testing solution, including assertions, mocking, and jsdom with zero configuration. The downside of Jest is that it can run significantly slower than Mocha, particularly with large test suites.

When choosing a test runner, a general guideline is:
When choosing a test runner, a general guideline is
- For speed and configurability, choose Mocha
- For ease-of-use and developer experience, choose Jest

@@ -75,4 +75,4 @@ When choosing a test runner, a general guideline is:
[jsdom]: [https://github.com/jsdom/jsdom]
[enzyme]: [https://airbnb.io/enzyme/]
[jest]: https://jestjs.io/
[dom]: [https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model]
[dom]: [https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model]

0 comments on commit 5fcff43

Please sign in to comment.
You can’t perform that action at this time.