0.2.1 • Published 3 years ago

mocha-bar v0.2.1

Weekly downloads
8
License
ISC
Repository
github
Last release
3 years ago

Mocha Bar · npm version

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.

npm install --save-dev mocha-bar

Then edit the HTML file that runs the tests, inserting the following lines into the <head> element.

<link rel='stylesheet' href='../node_modules/mocha-bar/mocha-bar.css'>
<script src='../node_modules/mocha-bar/mocha-bar.js'></script>

Finally, edit your JavaScript and tell Mocha to use the reporter:

mocha.setup({ reporter: MochaBar, ui: 'bdd' });

In TypeScript, an additional type import may be required:

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:

{
    "compilerOptions": {
        "types": [
            "mocha-bar"
        ]
    }
}
0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago