# Getting started with Mocha

**URL:** <https://club.ministryoftesting.com/t/getting-started-with-mocha/1054>\
**Category:** Archive\
**Tags:** automation\
**Created:** [2 July 2017 07:21 UTC](https://club.ministryoftesting.com/t/getting-started-with-mocha/1054 "2017-07-02T07:21:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heather\_reid](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/heather_reid/32/29_2.png) [@heather\_reid](https://club.ministryoftesting.com/u/heather_reid)\
**Post date:** [2 July 2017 07:21 UTC](https://club.ministryoftesting.com/t/getting-started-with-mocha/1054/1 "2017-07-02T07:21:11Z")

</div>

I’m moving to a company that uses Mocha with Javascript as part of their automation. This is not something I’ve had experience with before but learning on the job isn’t a problem.

When I was trying to learn Selenium it took me a _very_ long time to find helpful tutorials for it. With a quick look around on Google I’ve found some guides on the [Mocha site](https://mochajs.org/) and a [GitHubGist](https://gist.github.com/soheilhy/867f76feea7cab4f8a84).

Has anyone got experience with Mocha? Would you recommend these or others? I’m keen to not end up in the same situation I did with Selenium if I can!

---

<div class="post-metadata">

**Author:** ![mintgreenmonkey](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/mintgreenmonkey/32/3951_2.png) [@mintgreenmonkey](https://club.ministryoftesting.com/u/mintgreenmonkey)\
**Post date:** [4 July 2017 10:03 UTC](https://club.ministryoftesting.com/t/getting-started-with-mocha/1054/2 "2017-07-04T10:03:42Z")

</div>

[Here’s my reply to your question.](http://www.twitlonger.com/show/n_1sq0ggv) I’m not able to reply directly as there are \>2 hyperlinks in the text!

---

<div class="post-metadata">

**Author:** ![burythehammer](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/burythehammer/32/168_2.png) [@burythehammer](https://club.ministryoftesting.com/u/burythehammer)\
**Post date:** [5 July 2017 09:55 UTC](https://club.ministryoftesting.com/t/getting-started-with-mocha/1054/3 "2017-07-05T09:55:46Z")

</div>

I use Mocha with a current client.

It’s very similar in design to both RSpec (ruby) and Jasmine (js), which is worth bearing in mind - you could probably even reuse a lot of the code and rejig the syntax.

If you need somewhere to start, I made a github repo with some example API tests here: [https://github.com/opencredo/js-api-testing-quickstart](https://github.com/opencredo/js-api-testing-quickstart)

The javascript may look a little different to the code you work with, as I’m using Babel (transpiling from ES2015) and Flow (type checking).
