Wondering what’s next for npm?Check out our public roadmap! »

    expect-to-promises

    1.0.0 • Public • Published

    expect-to-promises

    Promise assertions for expect-to.

    Installation

    npm install --save-dev expect-to-promises
    

    Assertions

    • eventually

      const foo = Promise.resolve('foo');
       
      expect(foo).to(eventually(equal('foo')));
      expect(foo).to(eventually(not(equal('bar'))));
       
      const obj = Promise.resolve({ name: 'kim' });
      expect(obj).to(eventually(deepEqual({ name: 'kim' })));
    • beFulfilled

      const foo = Promise.resolve('foo');
      expect(foo).to(beFulfilled);
    • beRejected

      const err = Promise.reject(new Error('bar'));
      expect(err).to(beRejected);

    Install

    npm i expect-to-promises

    DownloadsWeekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar