# jest-async-fn

> ![test: passed](https://raw.githubusercontent.com/PavelDymkov/jest-async-fn/main/badges/test.svg) ![license: ISC](https://raw.githubusercontent.com/PavelDymkov/jest-async-fn/main/badges/license.svg)

Latest version **1.0.1** (published 2023-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install jest-async-fn
pnpm add jest-async-fn
yarn add jest-async-fn
bun add jest-async-fn
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-02-12 |
| First published | 2022-10-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Pavel Dymkov |
| Maintainers | paveldymkov |
| Keywords | jest, async, mock, fn |

## Links

- npm: https://www.npmjs.com/package/jest-async-fn
- Repository: https://github.com/PavelDymkov/jest-async-fn
- Homepage: https://github.com/PavelDymkov/jest-async-fn#readme
- Issues: https://github.com/PavelDymkov/jest-async-fn/issues
- npm.io page: https://npm.io/package/jest-async-fn

## Alternatives

- [pagerjs](https://npm.io/package/pagerjs.md) — 60 weekly downloads
- [whistle.savefor-mock](https://npm.io/package/whistle.savefor-mock.md) — 4 weekly downloads
- [@cormijs/plugin-mock](https://npm.io/package/@cormijs/plugin-mock.md) — 0 weekly downloads
- [@lit-material/jump-links](https://npm.io/package/@lit-material/jump-links.md) — 0 weekly downloads
- [gbflowengine](https://npm.io/package/gbflowengine.md) — 0 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-02-12
- 1.0.0 — 2022-10-04

## README

# jest-async-fn

![test: passed](https://raw.githubusercontent.com/PavelDymkov/jest-async-fn/main/badges/test.svg)
![license: ISC](https://raw.githubusercontent.com/PavelDymkov/jest-async-fn/main/badges/license.svg)

## Usage

```ts
import { createAsyncFn } from "jest-async-fn";

it("test", async () => {
    const [resolved, callback] = createAsyncFn();

    someAsyncFunctionWithCallback(callback);

    await resolved;

    expect(callback).toHaveBeenCalled();
});
```

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