# Mocha

<figure><img src="https://1326643208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpMhTPhBTwVaw7bZVBjY%2Fuploads%2Fgit-blob-ae7bbbb1057adb7225342176d16f217c07f1b216%2FMocha_logo.svg?alt=media" alt="" width="256"><figcaption></figcaption></figure>

Mocha is a feature-rich JavaScript test framework running on [Node.js](https://nodejs.org/) and in the browser, making asynchronous testing *simple* and *fun*. Mocha can generate standard format JUnit-style XML files which can be submited to Testfiesta or Testrail using taco truck cli. You just need to install the popular [`Mocha`](https://mochajs.org/#installation) and install tacotruck cli or use [Github action](https://github.com/testfiesta/tacotruck-action). Check out simple mocha [example](https://github.com/testfiesta/tacotruck-examples/tree/main/demo-mocha-tf).

### Install Tacotruck CLI

{% code overflow="wrap" fullWidth="false" %}

```sh
$ npm install -g @testfiesta/tacotruck
```

{% endcode %}

### Submit test results

{% tabs %}
{% tab title="Testfiesta" %}

```sh
tacotruck testfiesta \
  run:submit \
  --token testfiesta_... \
  --handle orgHandle \
  --key projectKey \
  --name runName \
  --data results-path/*.xml
```

{% endtab %}
{% endtabs %}

### Support and Resources

* [TacoTruck Examples](https://github.com/testfiesta/tacotruck-examples)
* [Mocha Docs](https://mochajs.org/next)
* [Tacotruck Issues](https://github.com/testfiesta/tacotruck/issues)
* [**CLI Reference**](https://docs.testfiesta.com/automation/tacotruck-cli)
* [Tacotruck Github Action](https://github.com/testfiesta/tacotruck-action)
