3.0.7 • Published 4 years ago
ismocha v3.0.7
ismocha
ismocha checks whether code is run using Mocha.
Status
| Category | Status |
|---|---|
| Version | |
| Dependencies | |
| Dev dependencies | |
| Build | |
| License |
Installation
$ npm install ismochaQuick 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