async-test-tools
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Async test tools

Sometimes for testing asynchronous code it's needed to run an event loop, to make promise.then method run, etc. With this library test with timeouts and async code would look like follows

it('Does what we want', () => {
  return Async.sequence([
    () => { // make a first step here },
    () => { // make a second step here },
  ],
  () => {
    // All final checks, asserts and expects here
  });
});


/async-test-tools/

    Package Sidebar

    Install

    npm i async-test-tools

    Weekly Downloads

    6,274

    Version

    1.0.7

    License

    ISC

    Last publish

    Collaborators

    • twilio-messaging