New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mocha-bar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-bar

Fast Mocha test reporter for the browser

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

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"
        ]
    }
}

Keywords

bar

FAQs

Package last updated on 25 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts