# Share a Mochawesome Report — Mocha Results on a URL

Canonical: https://commareports.com/share-mochawesome-report
Published: 2026-08-23

> Mochawesome writes a good-looking HTML report into a folder nobody opens. Publish it to Comma: one link per suite, a comment thread on the flaky test, and a revision per run instead of a build artifact.

# Share a Mochawesome report

Mochawesome solves the ugly part of Mocha output and stops there. You get a
clean HTML report with pass/fail counts, expandable suites and captured
errors — written to `mochawesome-report/` on a CI worker, retained for seven
days, and opened by approximately nobody, because opening it means finding
the run, downloading the artifact, unzipping it and double-clicking a file.

So the team reads the red text in the log instead, which is the one place the
report was supposed to replace.

## Publish it

```bash
npx mocha --reporter mochawesome
npx marge mochawesome-report/mochawesome.json --inline -o report

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html report/mochawesome.html \
        --arg title "API suite — $(date +%F)" \
        '{title: $title, html: $html}')"
```

`--inline` folds the CSS and JavaScript into the HTML, so the whole report is
one file and the publish step is one command. Without it, drop the report
folder in instead — the entry HTML plus its `assets/` directory upload
together and relative references are rewritten.

Run the publish step with `if: always()` (or your CI's equivalent), because
the run you most need to share is the one that failed.

## What the URL changes

- **Failures get a conversation.** Highlight the assertion, pin "known race,
  ticket QA-88, fix in flight". See [commenting on HTML](/comment-on-html).
- **Flakes get a history.** One report id per suite, one revision per run —
  the pattern becomes visible instead of anecdotal.
- **Non-engineers can look.** A product manager checking whether the release
  suite is green opens a link, not a CI console.

## Limits

- **HTML body: 5 MB** — inlined reports for very large suites can exceed it;
  publish per suite, or drop `--inline` and upload the folder.
- **Scripts run, sandboxed:** `allow-scripts`, no `allow-same-origin`.
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision
history.

**[Publish a test report →](https://commareports.com/)**

### Related

- [Cypress reports](/share-cypress-report) · [Jest reports](/share-jest-report)
- [Playwright reports](/share-playwright-report) · [Allure reports](/share-allure-report)
- [Publish from CI](/docs/ci) · [JUnit XML](/share-junit-report)
