Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7653587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:04:00+00:00 2026-05-31T12:04:00+00:00

I have experience with Jasmine and do like it quite a bit. Does anyone

  • 0

I have experience with Jasmine and do like it quite a bit. Does anyone have experience with both Jasmine and Mocha, specifically for Rails? I am wondering if it’s worth switching to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:04:01+00:00Added an answer on May 31, 2026 at 12:04 pm

    I have done testing in both Jasmine and Mocha. First, switching is relatively easy. The basic describe and it BDD pattern is identical. You will need to change how you do your assertions and switch to a different interface for asynchronous tests. Overall they are comparable.

    Mocha’s asynchronous interface is much simpler and more consistent. Tests and setup can be either synchronous or asynchronous, which is great. This, plus the fact that TJ Holowaychuck is an epic code poet are good reasons to try Mocha.

    I do think the Jasmine matchers are easier to read and more elegant, especially when paired with the jasmine-jquery plugin. Mocha is usually paired with a separate library for assertions, often chai.js if you are doing in-browser testing or should.js for node-only testing. I am happy with chai’s assert.equal() interface, but the Jasmine style expect($("#central_errors").html()).toContain("must provide a name"); seems more elegant to me. I am not a fan of the chai.js expect(42).to.be.above(41) style interface with dot-delimited sentences because it doesn’t work well aurally.

    Ultimately, this is a personal preference question and I highly encourage you to just spend a day or so writing Mocha tests instead of Jasmine and see how it feels. Totally a worthwhile investment, even if you decide to stick with Jasmine you will be doing so from a place of first-hand knowledge and have an awareness of other ways to solve some of the problems Jasmine solves. I tried it and I’m sticking with Mocha partly because betting on TJ is a good bet, but Jasmine is also a mature, solid, and widely adopted library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

TLDR: Does anyone have experience of both protovis & D3.js to illuminate the differences
Anyone have experience playing audio (right now specifically mp3s) with python using a any
Does anybody have experience programming for both the Intel Math Kernel Library and the
Does anyone have experience developing with ESQL/C for INFORMIX-SQL, as in calling C funcs
Does anyone have experience writing professional OpenGL games on Windows? For the Mac, due
Does anyone have experience with database links between 10g and 11g? Is this a
Does anyone have experience of when SQL Server 2008 R2 is able to automatically
Does anyone have experience building a .NET test execution harness that can execute the
Does anyone have experience with trellis ? Looking at it as a framework for
Does anyone have experience collaborating with someone using a different version of Visual Studio?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.