Open izotomas opened 4 years ago
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.
I have a following setup where I use chai-as-promised, should, and chai-arrays:
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.