{"id":19706917,"url":"https://github.com/jason916/mocha-report-v2","last_synced_at":"2026-05-17T15:04:41.594Z","repository":{"id":74195270,"uuid":"287695304","full_name":"Jason916/mocha-report-v2","owner":"Jason916","description":"mocha report generator","archived":false,"fork":false,"pushed_at":"2020-11-09T09:34:02.000Z","size":1874,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T18:08:19.059Z","etag":null,"topics":["generator","mocha","reason","report","simple"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jason916.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-15T06:59:12.000Z","updated_at":"2020-11-09T09:34:05.000Z","dependencies_parsed_at":"2023-03-23T02:17:25.348Z","dependency_job_id":null,"html_url":"https://github.com/Jason916/mocha-report-v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jason916/mocha-report-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jason916%2Fmocha-report-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jason916%2Fmocha-report-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jason916%2Fmocha-report-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jason916%2Fmocha-report-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jason916","download_url":"https://codeload.github.com/Jason916/mocha-report-v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jason916%2Fmocha-report-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","mocha","reason","report","simple"],"created_at":"2024-11-11T21:37:25.099Z","updated_at":"2026-05-17T15:04:36.585Z","avatar_url":"https://github.com/Jason916.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"mocha-report-v2 (marge)\n============================\n[![npm](https://img.shields.io/npm/v/mochawesome-report-generator.svg)](http://www.npmjs.com/package/mochawesome-report-generator) [![Build Status](https://img.shields.io/travis/adamgruber/mochawesome-report-generator/master.svg)](https://travis-ci.org/adamgruber/mochawesome-report-generator) [![Test Coverage](https://api.codeclimate.com/v1/badges/613427ae1baabfb75360/test_coverage)](https://codeclimate.com/github/adamgruber/mochawesome-report-generator/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/613427ae1baabfb75360/maintainability)](https://codeclimate.com/github/adamgruber/mochawesome-report-generator/maintainability)\n\n**marge** (**m**och**a**wesome-**r**eport-**ge**nerator) is the counterpart to [mochawesome][2], a custom reporter for use with the Javascript testing framework, [mocha][1]. Marge takes the JSON output from [mochawesome][2] and generates a full fledged HTML/CSS report that helps visualize your test suites.\n\n## Features\n\n\u003cimg align=\"right\" src=\"./docs/marge-report-1.0.1.png\" alt=\"Mochawesome Report\" width=\"55%\" /\u003e\n\n- Simple, clean, and modern design\n- Beautiful charts\n- Support for test and suite nesting\n- Displays before and after hooks\n- Review test code inline\n- Stack trace for failed tests\n- Support for adding context information to tests\n- Filters to display only the tests you want\n- Responsive and mobile-friendly\n- Offline viewing\n- Support for IE9+\n- CLI for generating reports independent of [mochawesome][2]\n\n## Usage with mochawesome\n\n1. Add Mochawesome to your project:\n\n  `npm install --save-dev mochawesome`\n\n2. Tell mocha to use the Mochawesome reporter:\n\n  `mocha testfile.js --reporter mochawesome`\n\n3. If using mocha programatically:\n\n  ```js\n  var mocha = new Mocha({\n    reporter: 'mochawesome'\n  });\n  ```\n\n## CLI Usage\n\nInstall mocha-report-v2 package\n```bash\nnpm install -g mocha-report-v2\n```\n\nRun the command\n```bash\nmarge [options] data_file [data_file2 ...]\n```\n\n## Output\n**marge** generates the following inside your project directory:\n```\nmochawesome-report/\n├── assets\n│   ├── app.css\n│   ├── app.js\n│   ├── MaterialIcons-Regular.woff\n│   ├── MaterialIcons-Regular.woff2\n│   ├── roboto-light-webfont.woff\n│   ├── roboto-light-webfont.woff2\n│   ├── roboto-medium-webfont.woff\n│   ├── roboto-medium-webfont.woff2\n│   ├── roboto-regular-webfont.woff\n│   └── roboto-regular-webfont.woff2\n└── mochawesome.html\n```\n\n## Options\n\n### CLI Flags\n\n**marge** can be configured via the following command line flags:\n\nFlag | Type | Default | Description \n:--- | :--- | :------ | :----------\n-f, --reportFilename | string | | Filename of saved report\n-o, --reportDir | string | [cwd]/mochawesome-report | Path to save report\n-t, --reportTitle | string | mochawesome | Report title\n-p, --reportPageTitle | string | mochawesome-report | Browser title\n-i, --inline | boolean | false | Inline report assets (scripts, styles)\n--cdn | boolean | false | Load report assets via CDN (unpkg.com)\n--assetsDir | string | [cwd]/mochawesome-report/assets | Path to save report assets (js/css)\n--charts | boolean | true | Display Suite charts\n--code | boolean | true | Display test code\n--autoOpen | boolean | false | Automatically open the report\n--overwrite | boolean | true | Overwrite existing report files. *See [notes](#overwrite).*\n--timestamp, --ts | string | | Append timestamp in specified format to report filename. *See [notes](#timestamp).*\n--showPassed | boolean |  true | Set initial state of \"Show Passed\" filter\n--showFailed | boolean |  true | Set initial state of \"Show Failed\" filter\n--showPending | boolean | true | Set initial state of \"Show Pending\" filter\n--showSkipped | boolean | false | Set initial state of \"Show Skipped\" filter\n--showHooks | string | failed | Set the default display mode for hooks\n--saveJson | boolean | false |Should report data be saved to JSON file\n--saveHtml | boolean | true | Should report be saved to HTML file\n--dev | boolean | false | Enable dev mode (requires local webpack dev server)\n-h, --help | | | Show CLI help\n\n\n*Boolean options can be negated by adding `--no` before the option. For example: `--no-code` would set `code` to `false`.*\n\n#### Overwrite\nBy default, report files are overwritten by subsequent report generation. Passing `--overwrite=false` will not replace existing files. Instead, if a duplicate filename is found, the report will be saved with a counter digit added to the filename. (ie. `mochawesome_001.html`).\n\n**Note:** `overwrite` will always be `false` when passing multiple files or using the `timestamp` option.\n\n#### Timestamp\nThe `timestamp` option can be used to append a timestamp to the report filename. It uses [dateformat][] to parse format strings so you can pass any valid string that [dateformat][] accepts with a few exceptions. In order to produce valid filenames, the following \nreplacements are made:\n\nCharacters | Replacement | Example | Output\n:--- | :--- | :--- | :---\nspaces, commas | underscore | Wed March 29, 2017 | Wed_March_29_2017\nslashes | hyphen | 3/29/2017 | 3-29-2017\ncolons | null | 17:46:21 | 174621\n\nFurther, if you pass the flag with no format string, it will default to `isoDateTime`.\n\n### mochawesome `reporter-options`\n\nThe above CLI flags can be used as `reporter-options` when using the mochawesome reporter.\n\nUse them in a `mocha.opts` file:\n```js\n--reporter mochawesome\n--reporter-options overwrite=true,reportTitle=My\\ Custom\\ Title,showPassed=false\n```\n\nor as an object when using mocha programmatically:\n\n```js\nconst mocha = new Mocha({\n  reporter: 'mochawesome',\n  reporterOptions: {\n    overwrite: true,\n    reportTitle: 'My Custom Title',\n    showPassed: false\n  }\n});\n```\n\n## Development\n\nTo develop locally, clone the repo and install dependencies. In order to test end-to-end you must also clone [mochawesome][2] into a directory at the same level as this repo.\n\nYou can start the dev server with `npm run devserver`. If you are working on the CLI, use `npm run dev:cli` to watch for changes and rebuild.\n\n### Running Tests\n\n#### Unit Tests\nTo run unit tests, simply use `npm run test`. You can also run a single unit test with `npm run test:single path/to/test.js`.\n\n#### Functional Tests\nFunctional tests allow you to run real-world test cases in order to debug the output report. First, start up the dev server in one terminal window with `npm run devserver`. Then, in another window, run the tests with `npm run test:functional`. This will generate a report that you can open in the browser and debug.\n\nIf you want to run a specific folder of functional tests:\n`npm run test:functional path/to/tests`\n\nOr if you want to run a single test:\n`npm run test:functional path/to/test.js`\n\nOr mix and match:\n`npm run test:functional path/to/some/tests path/to/another/test.js`\n\n[1]: https://mochajs.org/\n[2]: https://github.com/adamgruber/mochawesome\n[dateformat]: https://github.com/felixge/node-dateformat\n[CHANGELOG]: CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason916%2Fmocha-report-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjason916%2Fmocha-report-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason916%2Fmocha-report-v2/lists"}