3.0.0 • Published 6 years ago

micmac v3.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

micmac

npm build codecov

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

Example

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

Install

npm i micmac

3.0.0

6 years ago

2.0.0

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago