Alternatives to Mocha logo

Alternatives to Mocha

Jasmine, Jest, Chai, Cypress, and Enzyme are the most popular alternatives and competitors to Mocha.
2.3K
1.6K
+ 1
399

What is Mocha and what are its top alternatives?

Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
Mocha is a tool in the Javascript Testing Framework category of a tech stack.
Mocha is an open source tool with 18.7K GitHub stars and 2.6K GitHub forks. Here鈥檚 a link to Mocha's open source repository on GitHub

Mocha alternatives & related posts

related Jasmine posts

Jorge Quiros
Jorge Quiros
SR QA Automation Engineer at Indecomm | 8 upvotes 248K views
Protractor
Protractor
Jasmine
Jasmine
JavaScript
JavaScript
Selenium
Selenium
Cypress
Cypress
#Testing
#Cypress
#Qaautomation

This is a trending topic on Automation testing for E2E web applications.

I have used Protractor and Jasmine for automation testing frameworks in JavaScript by using the Selenium web driver manager.

Now, new guy in town Cypress does not use Selenium and runs directly in your app without any json wire protrocol, but it does not support parallel testing or mobile testing.

Have you experienced both? Should I stick with old and known ?

#testing cypress #selenium qaautomation #qa

See more
Jasmine
Jasmine
Karma
Karma
Angular CLI
Angular CLI
Jest
Jest
Visual Studio Code
Visual Studio Code

Switched from Jasmine with Karma that come setup by Angular CLI to use Jest instead, since Jasmine and Karma were very finicky in my setup and had to be reconfigured frequently to run tests properly.

Jest was also easier to integrate into my workflow with Visual Studio Code.

See more

related Jest posts

Robert Zuber
Robert Zuber
CTO at CircleCI | 16 upvotes 301.1K views
atCircleCICircleCI
Next.js
Next.js
React
React
Storybook
Storybook
TypeScript
TypeScript
Emotion
Emotion
GraphQL
GraphQL
Apollo
Apollo
Jest
Jest
Percy
Percy
Cypress
Cypress

We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

See more
Russel Werner
Russel Werner
Lead Engineer at StackShare | 6 upvotes 61.5K views
atStackShareStackShare
Jest
Jest
Enzyme
Enzyme
React Storybook
React Storybook
Happo.io
Happo.io
Percy
Percy

We use Jest because when we rebooted our "front end" stack earlier last year, we need to have a testing solution (we didn't have any front-end tests before that!). Jest is fast and convenient and it has plenty of community support behind it. It let's us run our unit tests with Enzyme and snapshot tests.

This is an area that we are constantly reviewing to see what can be improved, both in terms of developer needs, accuracy, test maintainability, and coverage.

I'm currently exploring using React Storybook to be the record of snapshot tests and using some online services, such as Happo.io and Percy in our CI pipeline.

See more
Chai logo

Chai

84
24
0
84
24
+ 1
0
A BDD / TDD assertion library
    Be the first to leave a pro
    Chai logo
    Chai
    VS
    Mocha logo
    Mocha

    related Chai posts

    React
    React
    LoopBack
    LoopBack
    Node.js
    Node.js
    ExpressJS
    ExpressJS
    Elasticsearch
    Elasticsearch
    Kibana
    Kibana
    Logstash
    Logstash
    Sequelize
    Sequelize
    Mocha
    Mocha
    Chai
    Chai
    Visual Studio Code
    Visual Studio Code

    React LoopBack Node.js ExpressJS Elasticsearch Kibana Logstash Sequelize Mocha Chai Visual Studio Code are the combo of technologies being used by me to build BestPrice Extension with all its micro-services & Web-based fragments

    See more
    Cypress logo

    Cypress

    304
    157
    22
    304
    157
    + 1
    22
    Better, faster, and more reliable testing for anything that runs in a browser.
    Cypress logo
    Cypress
    VS
    Mocha logo
    Mocha

    related Cypress posts

    Robert Zuber
    Robert Zuber
    CTO at CircleCI | 16 upvotes 301.1K views
    atCircleCICircleCI
    Next.js
    Next.js
    React
    React
    Storybook
    Storybook
    TypeScript
    TypeScript
    Emotion
    Emotion
    GraphQL
    GraphQL
    Apollo
    Apollo
    Jest
    Jest
    Percy
    Percy
    Cypress
    Cypress

    We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

    See more
    Jorge Quiros
    Jorge Quiros
    SR QA Automation Engineer at Indecomm | 8 upvotes 248K views
    Protractor
    Protractor
    Jasmine
    Jasmine
    JavaScript
    JavaScript
    Selenium
    Selenium
    Cypress
    Cypress
    #Testing
    #Cypress
    #Qaautomation

    This is a trending topic on Automation testing for E2E web applications.

    I have used Protractor and Jasmine for automation testing frameworks in JavaScript by using the Selenium web driver manager.

    Now, new guy in town Cypress does not use Selenium and runs directly in your app without any json wire protrocol, but it does not support parallel testing or mobile testing.

    Have you experienced both? Should I stick with old and known ?

    #testing cypress #selenium qaautomation #qa

    See more
    Enzyme logo

    Enzyme

    254
    170
    0
    254
    170
    + 1
    0
    JavaScript Testing utilities for React, by Airbnb
      Be the first to leave a pro
      Enzyme logo
      Enzyme
      VS
      Mocha logo
      Mocha

      related Enzyme posts

      Russel Werner
      Russel Werner
      Lead Engineer at StackShare | 6 upvotes 61.5K views
      atStackShareStackShare
      Jest
      Jest
      Enzyme
      Enzyme
      React Storybook
      React Storybook
      Happo.io
      Happo.io
      Percy
      Percy

      We use Jest because when we rebooted our "front end" stack earlier last year, we need to have a testing solution (we didn't have any front-end tests before that!). Jest is fast and convenient and it has plenty of community support behind it. It let's us run our unit tests with Enzyme and snapshot tests.

      This is an area that we are constantly reviewing to see what can be improved, both in terms of developer needs, accuracy, test maintainability, and coverage.

      I'm currently exploring using React Storybook to be the record of snapshot tests and using some online services, such as Happo.io and Percy in our CI pipeline.

      See more
      Dschinkel Schinkel
      Dschinkel Schinkel
      Mocha
      Mocha
      Jest
      Jest
      JavaScript
      JavaScript
      React
      React
      Enzyme
      Enzyme
      #Tdd
      #Bdd
      #Testdrivendevelopment

      I use both mocha and Jest because:

      • I don't care whether teams use Jest or Mocha. But jest is way too overhyped. Most devs are writing integration tests and think that it's so much better but frankly I don't write integration tests as the way to get both design feedback and confidence when I code. I adhere to the test pyramid, not ice cream cone or the dumb "trophy"

      • I TDD, so I only ever use the "API" of test frameworks. I don't do a lot of integration tests for TDD and all the bells and whistles Jest provides you from the command-line I just don't need. And I certainly do not care about or touch Jest Snapshots, I despise them

      • My tests are fast enough because I write isolated tests with TDD, so I don't run into performance issues. Example: I write my tests in a way that I can run 300 tests in literally 1 second with mocha. So the Jest ability to pinpoint and only run those tests which are affected by code changes. I want to run all of them every time when I TDD. It's a different mindset when you TDD

      • I also mainly code in IntelliJ or WebStorm because I feel the tools in that IDE far surpass VSCode and I also love running the test UI runner in it vs. lousy command-line

      • I feel both mocha and Jest read just fine in terms of code readability. Jest might have shorter assertion syntax but I don't really care. I just care that I can read the damn test and my tests are written well and my test descriptions, as well as the code itself including constants represent business language, not technical. I care most about BDD, clean code, 4 rules of simple design, and SOLID

      • I don't like using mock frameworks so no I don't use Jest's Mocking framework. I don't have to mock a lot in my tests due to the nature of how I strive to code...I keep my design simple and modular using principals such as clean code and 4 rules of simple design. If I must mock, I create very simple custom mocks with JS

      • On the contrary to the belief that integration tests and mount are the way to go (this belief drives me absolutely crazy, especially Dodd's promoting that), I TDD with shallow & enzyme. My tests are simple. My design is driven by my tests and my tests give me quick and useful feedback. I have a course I'm working on coming out soon on TDD with React to show you how to truly test the FE and why the ice cream cone and trophy suck (you're being scammed people). Watch for that here: https://twitter.com/DaveSchinkel/status/1062267649235791873

      Don't forget to upvote this post!

      Mocha Jest JavaScript React @jsdom Enzyme #tdd #bdd #testdrivendevelopment

      See more
      Protractor logo

      Protractor

      163
      110
      6
      163
      110
      + 1
      6
      End-to-end test framework for Angular and AngularJS applications
      Protractor logo
      Protractor
      VS
      Mocha logo
      Mocha

      related Protractor posts

      Jorge Quiros
      Jorge Quiros
      SR QA Automation Engineer at Indecomm | 8 upvotes 248K views
      Protractor
      Protractor
      Jasmine
      Jasmine
      JavaScript
      JavaScript
      Selenium
      Selenium
      Cypress
      Cypress
      #Testing
      #Cypress
      #Qaautomation

      This is a trending topic on Automation testing for E2E web applications.

      I have used Protractor and Jasmine for automation testing frameworks in JavaScript by using the Selenium web driver manager.

      Now, new guy in town Cypress does not use Selenium and runs directly in your app without any json wire protrocol, but it does not support parallel testing or mobile testing.

      Have you experienced both? Should I stick with old and known ?

      #testing cypress #selenium qaautomation #qa

      See more
      AVA logo

      AVA

      86
      90
      28
      86
      90
      + 1
      28
      A refined, futuristic test runner
      AVA logo
      AVA
      VS
      Mocha logo
      Mocha
      SinonJS logo

      SinonJS

      53
      13
      1
      53
      13
      + 1
      1
      Standalone test spies, stubs and mocks for JavaScript
      SinonJS logo
      SinonJS
      VS
      Mocha logo
      Mocha
      QUnit logo

      QUnit

      47
      37
      13
      47
      37
      + 1
      13
      A JavaScript Unit Testing framework
      QUnit logo
      QUnit
      VS
      Mocha logo
      Mocha
      SuperTest logo

      SuperTest

      21
      5
      0
      21
      5
      + 1
      0
      A library for testing node.js HTTP servers
        Be the first to leave a pro
        SuperTest logo
        SuperTest
        VS
        Mocha logo
        Mocha
        CodeceptJS logo

        CodeceptJS

        13
        10
        20
        13
        10
        + 1
        20
        Modern End 2 End Testing Framework for NodeJS
        CodeceptJS logo
        CodeceptJS
        VS
        Mocha logo
        Mocha
        Majestic GUI logo

        Majestic GUI

        1
        6
        0
        1
        6
        + 1
        0
        Zero config GUI for Jest
          Be the first to leave a pro
          Majestic GUI logo
          Majestic GUI
          VS
          Mocha logo
          Mocha
          Vorlon.JS logo

          Vorlon.JS

          1
          2
          0
          1
          2
          + 1
          0
          An open source, extensible, platform-agnostic tool for remotely debugging and testing your JavaScript
            Be the first to leave a pro
            Vorlon.JS logo
            Vorlon.JS
            VS
            Mocha logo
            Mocha