ismocha
TypeScript icon, indicating that this package has built-in type declarations

3.0.7 • Public • Published

ismocha

ismocha checks whether code is run using Mocha.

Status

Category Status
Version npm
Dependencies David
Dev dependencies David
Build GitHub Actions
License GitHub

Installation

$ npm install ismocha

Quick start

First you need to integrate ismocha into your application.

const { isMocha } = require('ismocha');

If you use TypeScript, use the following code instead:

import { isMocha } from 'ismocha';

Then call the isMocha function. If you run this in a process started by Mocha, the function will return true; otherwise it will return false:

if (isMocha()) {
  // ...
}

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter

Readme

Keywords

Package Sidebar

Install

npm i ismocha

Weekly Downloads

59

Version

3.0.7

License

MIT

Unpacked Size

9.29 kB

Total Files

12

Last publish

Collaborators

  • thenativeweb-admin
  • goloroden