1.0.1 • Published 2 years ago
jest-async-fn v1.0.1
jest-async-fn
Usage
import { createAsyncFn } from "jest-async-fn";
it("test", async () => {
const [resolved, callback] = createAsyncFn();
someAsyncFunctionWithCallback(callback);
await resolved;
expect(callback).toHaveBeenCalled();
});