Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 16 days 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-25T22:37:20.000Z (over 3 years ago)
- Last Synced: 2024-12-08T10:08:14.542Z (24 days ago)
- Topics: bar, mocha, mocha-reporter, mocha-tests, testing
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- 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