Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not compatible with chai-arrays #261

Open
izotomas opened this issue Jan 22, 2020 · 0 comments
Open

not compatible with chai-arrays #261

izotomas opened this issue Jan 22, 2020 · 0 comments

Comments

@izotomas
Copy link

I have a following setup where I use chai-as-promised, should, and chai-arrays:

const chai = require('chai'),
  chaiAsPromised = require('chai-as-promised'),
  assertArrays = require('chai-arrays');

chai.should();
chai.use(assertArrays);
chai.use(chaiAsPromised);

describe('chai-array with chai-as-promised', async () => {
 const arr = ['a', 'b', 'c'];

  it('fails using chai-as-promised', async () => 
    await Prosmise.resolve(arr).should.eventually.containingAllOf(['c','b','a']);
  );

 it('works without chai-as-promised', async () => {
    let result = await Promise.resolve(arr);
    result.should.containingAllOf(['c', 'b', 'a']);
  });
});

I really don't know whether it's an issue of chai-as-promised, chai-arrays, or the syntax i'm using is wrong - so my apologies if I'm at wrong place, but it'd be really nice if the two could be used combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant