Skip to content

not compatible with chai-arrays #261

Open
@izotomas

Description

@izotomas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions