# micmac

> [![npm](https://badge.fury.io/js/micmac.svg)](https://badge.fury.io/js/micmac) [![build](https://travis-ci.org/dmail/micmac.svg?branch=master)](http://travis-ci.org/dmail/micmac) [![codecov](https://codecov.io/gh/dmail/micmac/branch/master/graph/badge.svg

Latest version **3.0.0** (published 2018-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install micmac
pnpm add micmac
yarn add micmac
bun add micmac
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2018-07-26 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.6.0 |
| Dependencies | 2 |
| Unpacked size | 235.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | dmail |

## Links

- npm: https://www.npmjs.com/package/micmac
- Repository: https://github.com/dmail/micmac
- Homepage: https://github.com/dmail/micmac#readme
- Issues: https://github.com/dmail/micmac/issues
- npm.io page: https://npm.io/package/micmac

## Dependencies (2)

- [big-js](https://npm.io/package/big-js.md) 3.1.3
- [@dmail/signal](https://npm.io/package/@dmail/signal.md) 2.0.1

## Recent versions

- 3.0.0 (latest) — 2018-07-26
- 2.0.0 — 2017-11-16
- 1.1.1 — 2017-11-04
- 1.1.0 — 2017-11-04
- 1.0.1 — 2017-11-04
- 1.0.0 — 2017-11-04
- 0.0.1 — 2017-09-11

## README

# micmac

[![npm](https://badge.fury.io/js/micmac.svg)](https://badge.fury.io/js/micmac)
[![build](https://travis-ci.org/dmail/micmac.svg?branch=master)](http://travis-ci.org/dmail/micmac)
[![codecov](https://codecov.io/gh/dmail/micmac/branch/master/graph/badge.svg)](https://codecov.io/gh/dmail/micmac)

Mock most native way to execute JavaScript asynchonously to trigger them manually for testing.

## Example

```javascript
import { mockExecution } from "micmac"

mockExecution(({ tick }) => {
  let called = false
  new Promise((resolve) => {
    setTimeout(resolve, 10)
  }).then(() => {
    called = true
  })
  called === false // no need to explain why
  tick(10)
  called === true // thanks to tick(10) above, check documentation to understand why
})
```

Check the [API documentation](./docs/api.md)

## Install

`npm i micmac`

---
_Source: https://npm.io/package/micmac · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
