https://github.com/fasttime/mocha-bar
Fast Mocha test reporter for the browser
https://github.com/fasttime/mocha-bar
bar mocha mocha-reporter mocha-tests testing
Last synced: about 1 month ago
JSON representation
Fast Mocha test reporter for the browser
- Host: GitHub
- URL: https://github.com/fasttime/mocha-bar
- Owner: fasttime
- License: isc
- Created: 2018-11-23T03:30:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-25T22:37:20.000Z (over 4 years ago)
- Last Synced: 2025-10-05T09:29:09.876Z (8 months ago)
- Topics: bar, mocha, mocha-reporter, mocha-tests, testing
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
# Mocha Bar · [![npm version][npm badge]][npm url]
Mocha Bar is a compact and fast test reporter for the browser.
## Setup Instructions
Add Mocha Bar to the `devDependencies` of your Node.js project: in the console, switch to your
project folder and enter the following command.
```console
npm install --save-dev mocha-bar
```
Then edit the HTML file that runs the tests, inserting the following lines into the ``
element.
```html
```
Finally, edit your JavaScript and tell Mocha to use the reporter:
```js
mocha.setup({ reporter: MochaBar, ui: 'bdd' });
```
In TypeScript, an additional type import may be required:
```ts
import type { } from 'mocha-bar';
mocha.setup({ reporter: MochaBar, ui: 'bdd' });
```
Alternatively, in your TypeScript configuration, include `"mocha-bar"` in the `types` list of the
`compilerOptions` section.
In **tsconfig.json**:
```json
{
"compilerOptions": {
"types": [
"mocha-bar"
]
}
}
```
[npm badge]: https://badge.fury.io/js/mocha-bar.svg
[npm url]: https://www.npmjs.com/package/mocha-bar