jest-async-fn
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

jest-async-fn

test: passed license: ISC

Usage

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

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

    someAsyncFunctionWithCallback(callback);

    await resolved;

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

Readme

Keywords

Package Sidebar

Install

npm i jest-async-fn

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

1.77 kB

Total Files

4

Last publish

Collaborators

  • paveldymkov